aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2014-04-27 11:07:41 +0300
committerEugene Sandulenko2014-04-27 11:07:41 +0300
commit10d3017737080e9f769d0625a7cb5790fb465dc6 (patch)
treeaf85d921a85242bf3b0d015631f3eaaa669db1ee
parenteaee951a2f4f6adf4be603a302134efa8c501183 (diff)
downloadscummvm-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.cpp11
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();
}
}