Ensure we update the playback state if we seek while paused.

This commit is contained in:
casey langen 2020-02-27 22:59:44 -08:00
parent 9cb6040491
commit eccc78defc
3 changed files with 6 additions and 1 deletions

View File

@ -176,6 +176,9 @@ void CrossfadeTransport::SetPosition(double seconds) {
Lock lock(this->stateMutex); Lock lock(this->stateMutex);
if (this->active.player) { if (this->active.player) {
if (this->state != PlaybackPlaying) {
this->SetPlaybackState(PlaybackPlaying);
}
this->active.player->SetPosition(seconds); this->active.player->SetPosition(seconds);
} }
} }

View File

@ -237,6 +237,9 @@ void GaplessTransport::SetPosition(double seconds) {
LockT lock(this->stateMutex); LockT lock(this->stateMutex);
if (this->activePlayer) { if (this->activePlayer) {
if (this->state != PlaybackPlaying) {
this->SetPlaybackState(PlaybackPlaying);
}
this->activePlayer->SetPosition(seconds); this->activePlayer->SetPosition(seconds);
} }
} }

View File

@ -141,7 +141,6 @@ palette, use ones that most closely match our desired colors */
#define COLOR_256_OFFWHITE 251 #define COLOR_256_OFFWHITE 251
#define SCALE(x) ((x * 1000) / 255) #define SCALE(x) ((x * 1000) / 255)
struct ThemeColor { struct ThemeColor {
ThemeColor() { ThemeColor() {
Set(0, 0, 0, 0, -1); Set(0, 0, 0, 0, -1);