aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/qmmp/qmmpaudioengine.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qmmp/qmmpaudioengine.cpp b/src/qmmp/qmmpaudioengine.cpp
index d34d42b51..6d76ff591 100644
--- a/src/qmmp/qmmpaudioengine.cpp
+++ b/src/qmmp/qmmpaudioengine.cpp
@@ -412,12 +412,14 @@ void QmmpAudioEngine::run()
StateHandler::instance()->sendFinished();
StateHandler::instance()->dispatch(Qmmp::Stopped); //fake stop/start cycle
StateHandler::instance()->dispatch(Qmmp::Buffering);
- StateHandler::instance()->dispatch(Qmmp::Playing);
m_decoder->next();
StateHandler::instance()->dispatch(m_decoder->totalTime());
m_replayGain->setReplayGainInfo(m_decoder->replayGainInfo(), m_decoder->hasHeadroom());
+ m_output->mutex()->lock();
m_output->seek(0); //reset counter
+ m_output->mutex()->unlock();
addOffset(); //offset
+ StateHandler::instance()->dispatch(Qmmp::Playing);
mutex()->unlock();
continue;
}
@@ -435,9 +437,11 @@ void QmmpAudioEngine::run()
StateHandler::instance()->sendFinished();
StateHandler::instance()->dispatch(Qmmp::Stopped); //fake stop/start cycle
StateHandler::instance()->dispatch(Qmmp::Buffering);
- StateHandler::instance()->dispatch(Qmmp::Playing);
StateHandler::instance()->dispatch(m_decoder->totalTime());
+ m_output->mutex()->lock();
m_output->seek(0); //reset counter
+ m_output->mutex()->unlock();
+ StateHandler::instance()->dispatch(Qmmp::Playing);
mutex()->unlock();
sendMetaData();
addOffset(); //offset