diff options
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/imuse_digi/dimuse_sndmgr.cpp | 6 | ||||
-rw-r--r-- | engines/scumm/smush/smush_player.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/sound.cpp | 13 |
3 files changed, 16 insertions, 7 deletions
diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp index ce963eaeea..8340af3eb5 100644 --- a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp +++ b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp @@ -615,13 +615,15 @@ int32 ImuseDigiSndMgr::getDataFromRegion(soundStruct *soundHandle, int region, b oggMode = true; } if (!soundHandle->compressedStream) { + Common::MemoryReadStream *tmp = cmpFile->readStream(len); + assert(tmp); #ifdef USE_VORBIS if (oggMode) - soundHandle->compressedStream = Audio::makeVorbisStream(cmpFile, len); + soundHandle->compressedStream = Audio::makeVorbisStream(tmp, true); #endif #ifdef USE_MAD if (!oggMode) - soundHandle->compressedStream = Audio::makeMP3Stream(cmpFile, len); + soundHandle->compressedStream = Audio::makeMP3Stream(tmp, true); #endif assert(soundHandle->compressedStream); } diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp index 2c744a16e2..e7663c61c1 100644 --- a/engines/scumm/smush/smush_player.cpp +++ b/engines/scumm/smush/smush_player.cpp @@ -1183,7 +1183,7 @@ void SmushPlayer::tryCmpFile(const char *filename) { strcpy(fname + (i - filename), ".ogg"); if (file->open(fname)) { _compressedFileMode = true; - _vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_compressedFileSoundHandle, Audio::makeVorbisStream(file, true, 0, 0)); + _vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_compressedFileSoundHandle, Audio::makeVorbisStream(file, true)); return; } #endif @@ -1192,7 +1192,7 @@ void SmushPlayer::tryCmpFile(const char *filename) { strcpy(fname + (i - filename), ".mp3"); if (file->open(fname)) { _compressedFileMode = true; - _vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_compressedFileSoundHandle, Audio::makeMP3Stream(file, true, 0, 0)); + _vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_compressedFileSoundHandle, Audio::makeMP3Stream(file, true)); return; } #endif diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp index e5720a013f..c42d9adf45 100644 --- a/engines/scumm/sound.cpp +++ b/engines/scumm/sound.cpp @@ -607,24 +607,31 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, Audio::SoundHandle if (!_soundsPaused && _mixer->isReady()) { Audio::AudioStream *input = NULL; + Common::MemoryReadStream *tmp = NULL; switch (_soundMode) { case kMP3Mode: #ifdef USE_MAD assert(size > 0); - input = Audio::makeMP3Stream(_sfxFile, size); + tmp = _sfxFile->readStream(size); + assert(tmp); + input = Audio::makeMP3Stream(tmp, true); #endif break; case kVorbisMode: #ifdef USE_VORBIS assert(size > 0); - input = Audio::makeVorbisStream(_sfxFile, size); + tmp = _sfxFile->readStream(size); + assert(tmp); + input = Audio::makeVorbisStream(tmp, true); #endif break; case kFlacMode: #ifdef USE_FLAC assert(size > 0); - input = Audio::makeFlacStream(_sfxFile, size); + tmp = _sfxFile->readStream(size); + assert(tmp); + input = Audio::makeFlacStream(tmp, true); #endif break; default: |