From 45f6129ae7c2b9904b292d8b6b16ea36e9126a86 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 11 Nov 2015 16:49:15 +0100 Subject: [PATCH] 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. --- src/player/Control.cxx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/player/Control.cxx b/src/player/Control.cxx index db8a8b779..2f788ff44 100644 --- a/src/player/Control.cxx +++ b/src/player/Control.cxx @@ -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