diff options
author | Eugene Sandulenko | 2014-04-26 15:06:23 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2014-04-26 15:06:23 +0300 |
commit | 2f10c8ec55e5e8f43f6932199ec3bc402e0ec139 (patch) | |
tree | e10765b0683a8d50996dba230ea12704337c055d | |
parent | ba14a54d791bb59442c172a0f966a5b13b6a569b (diff) | |
download | scummvm-rg350-2f10c8ec55e5e8f43f6932199ec3bc402e0ec139.tar.gz scummvm-rg350-2f10c8ec55e5e8f43f6932199ec3bc402e0ec139.tar.bz2 scummvm-rg350-2f10c8ec55e5e8f43f6932199ec3bc402e0ec139.zip |
FULLPIPE: Proper implementation of FullpipeEngine::playSound()
-rw-r--r-- | engines/fullpipe/sound.cpp | 11 |
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); |