mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 15:47:38 +02:00
* Change AudioEngine's state before emitting the signal.
This commit is contained in:
@@ -81,14 +81,17 @@ AudioEnginePrivate::onStateChanged( Phonon::State newState, Phonon::State oldSta
|
|||||||
}
|
}
|
||||||
if ( newState == Phonon::PlayingState )
|
if ( newState == Phonon::PlayingState )
|
||||||
{
|
{
|
||||||
|
bool emitSignal = false;
|
||||||
if ( q_ptr->state() != AudioEngine::Paused && q_ptr->state() != AudioEngine::Playing )
|
if ( q_ptr->state() != AudioEngine::Paused && q_ptr->state() != AudioEngine::Playing )
|
||||||
{
|
{
|
||||||
underrunCount = 0;
|
underrunCount = 0;
|
||||||
underrunNotified = false;
|
underrunNotified = false;
|
||||||
emit q_ptr->started( currentTrack );
|
emitSignal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
q_ptr->setState( AudioEngine::Playing );
|
q_ptr->setState( AudioEngine::Playing );
|
||||||
|
|
||||||
|
if ( emitSignal )
|
||||||
|
emit q_ptr->started( currentTrack );
|
||||||
}
|
}
|
||||||
if ( newState == Phonon::StoppedState && oldState == Phonon::PausedState )
|
if ( newState == Phonon::StoppedState && oldState == Phonon::PausedState )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user