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:
Max Kellermann 2015-11-11 16:49:15 +01:00
parent f3503e0026
commit 45f6129ae7

View File

@ -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