diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-03-20 20:42:58 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-03-20 20:42:58 +0000 |
| commit | bf2aa475c185844b892f6354ea092bb7058ba3e1 (patch) | |
| tree | 4a0648967c14a05bac8b1f4cd9ddd8bf2660f003 /src | |
| parent | 75281f98fa68c5326e4725b107317d8f477e3e7d (diff) | |
| download | qmmp-bf2aa475c185844b892f6354ea092bb7058ba3e1.tar.gz qmmp-bf2aa475c185844b892f6354ea092bb7058ba3e1.tar.bz2 qmmp-bf2aa475c185844b892f6354ea092bb7058ba3e1.zip | |
removed unused function
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1636 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
| -rw-r--r-- | src/qmmp/soundcore.cpp | 17 | ||||
| -rw-r--r-- | src/qmmp/soundcore.h | 4 |
2 files changed, 5 insertions, 16 deletions
diff --git a/src/qmmp/soundcore.cpp b/src/qmmp/soundcore.cpp index fbab2472a..9ead18b6b 100644 --- a/src/qmmp/soundcore.cpp +++ b/src/qmmp/soundcore.cpp @@ -50,6 +50,7 @@ SoundCore::SoundCore(QObject *parent) m_parentWidget = 0; m_engine = 0; m_pendingEngine = 0; + m_volumeControl = 0; for (int i = 1; i < 10; ++i) m_bands[i] = 0; m_handler = new StateHandler(this); @@ -63,8 +64,7 @@ SoundCore::SoundCore(QObject *parent) connect(m_handler, SIGNAL(stateChanged (Qmmp::State)), SLOT(startPendingEngine())); connect(m_handler, SIGNAL(aboutToFinish()), SIGNAL(aboutToFinish())); connect(m_handler, SIGNAL(bufferingProgress(int)), SIGNAL(bufferingProgress(int))); - m_volumeControl = VolumeControl::create(this); - connect(m_volumeControl, SIGNAL(volumeChanged(int, int)), SIGNAL(volumeChanged(int, int))); + updateVolume(); connect(QmmpSettings::instance(), SIGNAL(audioSettingsChanged()), SLOT(updateVolume())); } @@ -110,10 +110,7 @@ void SoundCore::stop() if(m_pendingEngine) delete m_pendingEngine; m_pendingEngine = 0; - //update VolumeControl - delete m_volumeControl; - m_volumeControl = VolumeControl::create(this); - connect(m_volumeControl, SIGNAL(volumeChanged(int, int)), SIGNAL(volumeChanged(int, int))); + updateVolume(); if(state() == Qmmp::NormalError || state() == Qmmp::FatalError || state() == Qmmp::Buffering) StateHandler::instance()->dispatch(Qmmp::Stopped); //clear error and buffering state } @@ -181,18 +178,14 @@ void SoundCore::updateVolume() { if (m_engine) m_engine->mutex()->lock(); - delete m_volumeControl; + if(m_volumeControl) + delete m_volumeControl; m_volumeControl = VolumeControl::create(this); connect(m_volumeControl, SIGNAL(volumeChanged(int, int)), SIGNAL(volumeChanged(int, int))); if (m_engine) m_engine->mutex()->unlock(); } -bool SoundCore::softwareVolume() -{ - return SoftwareVolume::instance() != 0; -} - qint64 SoundCore::elapsed() { return m_handler->elapsed(); diff --git a/src/qmmp/soundcore.h b/src/qmmp/soundcore.h index 51b6b440a..d1baf614a 100644 --- a/src/qmmp/soundcore.h +++ b/src/qmmp/soundcore.h @@ -71,10 +71,6 @@ public: */ int rightVolume(); /*! - * Returns \b true if software volume is used, otherwise returns \b false - */ - bool softwareVolume(); - /*! * Returns the current time (in milliseconds). */ qint64 elapsed(); |
