aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/fullpipe/sound.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp
index d0f8fbd21b..628d352e54 100644
--- a/engines/fullpipe/sound.cpp
+++ b/engines/fullpipe/sound.cpp
@@ -266,13 +266,20 @@ void FullpipeEngine::toggleMute() {
}
void FullpipeEngine::playSound(int id, int flag) {
- SoundList *soundList = _currentScene->_soundList;
- Sound *sound = soundList->getSoundById(id);
+ Sound *sound = 0;
+
+ for (int i = 0; i < _currSoundListCount; i++) {
+ sound = _currSoundList1[i]->getSoundById(id);
+
+ if (sound)
+ break;
+ }
if (!sound) {
warning("playSound: Can't find sound with ID %d", id);
return;
}
+
byte *soundData = sound->loadData();
Common::MemoryReadStream *dataStream = new Common::MemoryReadStream(soundData, sound->getDataSize());
Audio::RewindableAudioStream *wav = Audio::makeWAVStream(dataStream, DisposeAfterUse::YES);