mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 17:29:11 +00:00
FULLPIPE: Proper implementation of FullpipeEngine::playSound()
This commit is contained in:
parent
ba14a54d79
commit
2f10c8ec55
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user