player/Control: don't stop playback in Play()
Instead of stopping playback completely, only CANCEL the queued song if necessary, and use the SEEK command to play the selected song. SEEK will take care for current playback state.
This commit is contained in:
@@ -55,15 +55,7 @@ PlayerControl::Play(DetachedSong *song)
|
||||
assert(song != nullptr);
|
||||
|
||||
const ScopeLock protect(mutex);
|
||||
|
||||
if (state != PlayerState::STOP)
|
||||
SynchronousCommand(PlayerCommand::STOP);
|
||||
|
||||
assert(next_song == nullptr);
|
||||
|
||||
EnqueueSongLocked(song);
|
||||
|
||||
assert(next_song == nullptr);
|
||||
SeekLocked(song, SongTime::zero(), IgnoreError());
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user