diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2011-06-27 16:50:02 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2011-06-27 16:50:02 +0000 |
| commit | 40fb51b6a7e292f66a97fe414493d9441c4702ab (patch) | |
| tree | 1f2b522cbc3da736e3f49de4b0de3ebdc23636b9 /src | |
| parent | c04f69b6a29bf2fe90bb8f637182e3e0b36dbe04 (diff) | |
| download | qmmp-40fb51b6a7e292f66a97fe414493d9441c4702ab.tar.gz qmmp-40fb51b6a7e292f66a97fe414493d9441c4702ab.tar.bz2 qmmp-40fb51b6a7e292f66a97fe414493d9441c4702ab.zip | |
removed useless code, fixed regression
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2238 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
| -rw-r--r-- | src/qmmp/abstractengine.cpp | 4 | ||||
| -rw-r--r-- | src/qmmp/abstractengine.h | 6 | ||||
| -rw-r--r-- | src/qmmp/qmmpaudioengine.cpp | 24 | ||||
| -rw-r--r-- | src/qmmp/qmmpaudioengine.h | 1 |
4 files changed, 8 insertions, 27 deletions
diff --git a/src/qmmp/abstractengine.cpp b/src/qmmp/abstractengine.cpp index 308d9fc41..702bf66aa 100644 --- a/src/qmmp/abstractengine.cpp +++ b/src/qmmp/abstractengine.cpp @@ -36,10 +36,10 @@ QMutex *AbstractEngine::mutex() return &m_mutex; } -QWaitCondition *AbstractEngine::cond() +/*QWaitCondition *AbstractEngine::cond() { return &m_waitCondition; -} +}*/ // static methods QList<EngineFactory*> *AbstractEngine::m_factories = 0; diff --git a/src/qmmp/abstractengine.h b/src/qmmp/abstractengine.h index ea1c29281..a08a0c62d 100644 --- a/src/qmmp/abstractengine.h +++ b/src/qmmp/abstractengine.h @@ -22,7 +22,7 @@ #define ABSTRACTENGINE_H #include <QMutex> -#include <QWaitCondition> +//#include <QWaitCondition> #include <QThread> #include <QStringList> #include "enginefactory.h" @@ -78,7 +78,7 @@ public: /*! * Returns wait condition pointer. */ - QWaitCondition *cond(); + //QWaitCondition *cond(); /*! * Creates Engine object. * @param s InputSource object. @@ -123,7 +123,7 @@ signals: private: QMutex m_mutex; - QWaitCondition m_waitCondition; + //QWaitCondition m_waitCondition; static void checkFactories(); static QList<EngineFactory*> *m_factories; diff --git a/src/qmmp/qmmpaudioengine.cpp b/src/qmmp/qmmpaudioengine.cpp index 3b811d355..0ba012e9c 100644 --- a/src/qmmp/qmmpaudioengine.cpp +++ b/src/qmmp/qmmpaudioengine.cpp @@ -220,15 +220,6 @@ void QmmpAudioEngine::pause() if (m_output) m_output->pause(); - - // wake up threads - if (m_decoder) - { - mutex()->lock (); - cond()->wakeAll(); - mutex()->unlock(); - } - if (m_output) { m_output->recycler()->mutex()->lock (); @@ -244,6 +235,9 @@ void QmmpAudioEngine::stop() m_user_stop = true; mutex()->unlock(); + if (m_output) + m_output->recycler()->cond()->wakeAll(); + wait(); if (m_output) @@ -254,20 +248,9 @@ void QmmpAudioEngine::stop() } // wake up threads - - mutex()->lock (); - cond()->wakeAll(); - mutex()->unlock(); - if (m_output) { - m_output->recycler()->mutex()->lock (); m_output->recycler()->cond()->wakeAll(); - m_output->recycler()->mutex()->unlock(); - } - - if (m_output) - { m_output->wait(); delete m_output; m_output = 0; @@ -409,7 +392,6 @@ void QmmpAudioEngine::run() flush(true); finish(); //wake up waiting threads - cond()->wakeAll(); mutex()->unlock(); m_output->recycler()->mutex()->lock (); m_output->recycler()->cond()->wakeAll(); diff --git a/src/qmmp/qmmpaudioengine.h b/src/qmmp/qmmpaudioengine.h index 77be8c350..aaef326da 100644 --- a/src/qmmp/qmmpaudioengine.h +++ b/src/qmmp/qmmpaudioengine.h @@ -60,7 +60,6 @@ public: private slots: void finish(); - //void updateEqSettings(); void updateReplayGainSettings(); private: |
