From 12e5062cf55087abd3bd9dc8d1b22344a03e0b50 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Sat, 19 Jul 2014 16:41:38 +0100 Subject: [PATCH] If the audio has stopped, transfer the AudioEngine state to Stopped too This needs to be done to handle unpausable tracks correctly in the UI. --- src/libtomahawk/audio/AudioEngine.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libtomahawk/audio/AudioEngine.cpp b/src/libtomahawk/audio/AudioEngine.cpp index 7d7c7f835..d310ae3cf 100644 --- a/src/libtomahawk/audio/AudioEngine.cpp +++ b/src/libtomahawk/audio/AudioEngine.cpp @@ -146,6 +146,15 @@ AudioEnginePrivate::onStateChanged( Phonon::State newState, Phonon::State oldSta q_ptr->stop(); } } + else + { + // We did not expect a Stop here, so do not go to the next track + // but change the AudioEngine state + // + // A possible scenario where we can reach this is point if we pause + // an stream that cannot be paused. + q_ptr->setState( AudioEngine::Stopped ); + } } }