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:
parent
f3503e0026
commit
45f6129ae7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user