mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-19 23:41:51 +02:00
* Fixed race condition in AudioEngine.
This commit is contained in:
parent
8f4ea6d95d
commit
5e4b5fa0d0
@ -525,12 +525,12 @@ AudioEngine::onStateChanged( Phonon::State newState, Phonon::State oldState )
|
||||
|
||||
if ( oldState == Phonon::PlayingState )
|
||||
{
|
||||
qint64 duration = m_mediaObject->totalTime() > 0 ? m_mediaObject->totalTime() : m_currentTrack->duration() * 1000;
|
||||
bool stopped = false;
|
||||
switch ( newState )
|
||||
{
|
||||
case Phonon::PausedState:
|
||||
{
|
||||
qint64 duration = m_mediaObject->totalTime() > 0 ? m_mediaObject->totalTime() : m_currentTrack->duration() * 1000;
|
||||
stopped = ( duration - 1000 < m_mediaObject->currentTime() );
|
||||
if ( !stopped )
|
||||
setState( Paused );
|
||||
|
Loading…
x
Reference in New Issue
Block a user