diff options
Diffstat (limited to 'engines/titanic/sound')
-rw-r--r-- | engines/titanic/sound/sound.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/sound/sound.h | 2 | ||||
-rw-r--r-- | engines/titanic/sound/sound_manager.cpp | 6 | ||||
-rw-r--r-- | engines/titanic/sound/sound_manager.h | 8 |
4 files changed, 10 insertions, 8 deletions
diff --git a/engines/titanic/sound/sound.cpp b/engines/titanic/sound/sound.cpp index e48c8760c5..fb8cc299df 100644 --- a/engines/titanic/sound/sound.cpp +++ b/engines/titanic/sound/sound.cpp @@ -57,7 +57,7 @@ void CSound::preEnterView(CViewItem *newView, bool isNewRoom) { _soundManager.setListenerPosition(xp, yp, zp, cosVal, sinVal, 0, isNewRoom); } -bool CSound::isActive(int handle) const { +bool CSound::isActive(int handle) { if (handle != 0 && handle != -1) return _soundManager.isActive(handle); diff --git a/engines/titanic/sound/sound.h b/engines/titanic/sound/sound.h index 21f2a93f24..c767a3d75f 100644 --- a/engines/titanic/sound/sound.h +++ b/engines/titanic/sound/sound.h @@ -115,7 +115,7 @@ public: /** * Returns true if a sound with the specified handle is active */ - bool isActive(int handle) const; + bool isActive(int handle); /** * Sets the volume for a sound diff --git a/engines/titanic/sound/sound_manager.cpp b/engines/titanic/sound/sound_manager.cpp index c1a46e5103..5f8e53caf3 100644 --- a/engines/titanic/sound/sound_manager.cpp +++ b/engines/titanic/sound/sound_manager.cpp @@ -311,7 +311,9 @@ void QSoundManager::setPolarPosition(int handle, double range, double azimuth, d } } -bool QSoundManager::isActive(int handle) const { +bool QSoundManager::isActive(int handle) { + resetChannel(10); + for (uint idx = 0; idx < _slots.size(); ++idx) { if (_slots[idx]._handle == handle) return true; @@ -320,7 +322,7 @@ bool QSoundManager::isActive(int handle) const { return false; } -bool QSoundManager::isActive(const CWaveFile *waveFile) const { +bool QSoundManager::isActive(const CWaveFile *waveFile) { return _sounds.contains(waveFile); } diff --git a/engines/titanic/sound/sound_manager.h b/engines/titanic/sound/sound_manager.h index a3074a8e57..ff556346de 100644 --- a/engines/titanic/sound/sound_manager.h +++ b/engines/titanic/sound/sound_manager.h @@ -123,12 +123,12 @@ public: /** * Returns true if the given sound is currently active */ - virtual bool isActive(int handle) const = 0; + virtual bool isActive(int handle) = 0; /** * Returns true if the given sound is currently active */ - virtual bool isActive(const CWaveFile *waveFile) const { return false; } + virtual bool isActive(const CWaveFile *waveFile) { return false; } /** * Handles regularly updating the mixer @@ -395,12 +395,12 @@ public: /** * Returns true if the given sound is currently active */ - virtual bool isActive(int handle) const; + virtual bool isActive(int handle); /** * Returns true if the given sound is currently active */ - virtual bool isActive(const CWaveFile *waveFile) const; + virtual bool isActive(const CWaveFile *waveFile); /** * Handles regularly updating the mixer |