diff options
author | Eugene Sandulenko | 2014-04-27 11:07:41 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2014-04-27 11:07:41 +0300 |
commit | 10d3017737080e9f769d0625a7cb5790fb465dc6 (patch) | |
tree | af85d921a85242bf3b0d015631f3eaaa669db1ee | |
parent | eaee951a2f4f6adf4be603a302134efa8c501183 (diff) | |
download | scummvm-rg350-10d3017737080e9f769d0625a7cb5790fb465dc6.tar.gz scummvm-rg350-10d3017737080e9f769d0625a7cb5790fb465dc6.tar.bz2 scummvm-rg350-10d3017737080e9f769d0625a7cb5790fb465dc6.zip |
FULLPIPE: Proper implementation of FullpipeEngine::stopAllSoundInstances()
-rw-r--r-- | engines/fullpipe/sound.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp index c337209cf6..3c13bad854 100644 --- a/engines/fullpipe/sound.cpp +++ b/engines/fullpipe/sound.cpp @@ -429,14 +429,11 @@ void FullpipeEngine::stopAllSoundStreams() { } void FullpipeEngine::stopAllSoundInstances(int id) { - SoundList *soundList = _currentScene->_soundList; - - for (int i = 0; i < soundList->getCount(); i++) { - Sound *sound = soundList->getSoundByIndex(i); + for (int i = 0; i < _currSoundListCount; i++) { + Sound *sound = _currSoundList1[i]->getSoundItemById(id); - if (sound->getId() == id) { - _mixer->stopHandle(sound->getHandle()); - } + if (sound) + sound->stop(); } } |