1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-23 01:09:42 +01:00

* Change AudioEngine's state before emitting the signal.

This commit is contained in:
Christian Muehlhaeuser 2013-06-15 11:25:49 +02:00
parent 4d7efe82a2
commit 633350660e

View File

@ -81,14 +81,17 @@ AudioEnginePrivate::onStateChanged( Phonon::State newState, Phonon::State oldSta
}
if ( newState == Phonon::PlayingState )
{
bool emitSignal = false;
if ( q_ptr->state() != AudioEngine::Paused && q_ptr->state() != AudioEngine::Playing )
{
underrunCount = 0;
underrunNotified = false;
emit q_ptr->started( currentTrack );
emitSignal = true;
}
q_ptr->setState( AudioEngine::Playing );
if ( emitSignal )
emit q_ptr->started( currentTrack );
}
if ( newState == Phonon::StoppedState && oldState == Phonon::PausedState )
{