diff options
author | Johannes Schickel | 2008-02-07 23:13:13 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-02-07 23:13:13 +0000 |
commit | ae0b605ad4c2b69f1e47e0d98c5cf3a881267318 (patch) | |
tree | be84bc96837b8b2c8cd58be918ca25a13564df4f /engines/kyra/sound.cpp | |
parent | 356ae3b9ce8b28b50e1f3df8c45bddeb861cd45a (diff) | |
download | scummvm-rg350-ae0b605ad4c2b69f1e47e0d98c5cf3a881267318.tar.gz scummvm-rg350-ae0b605ad4c2b69f1e47e0d98c5cf3a881267318.tar.bz2 scummvm-rg350-ae0b605ad4c2b69f1e47e0d98c5cf3a881267318.zip |
Reworked Kyrandia resource loading code.
svn-id: r30820
Diffstat (limited to 'engines/kyra/sound.cpp')
-rw-r--r-- | engines/kyra/sound.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp index c2ec98c904..a93a9ed66a 100644 --- a/engines/kyra/sound.cpp +++ b/engines/kyra/sound.cpp @@ -39,7 +39,7 @@ namespace Kyra { Sound::Sound(KyraEngine *vm, Audio::Mixer *mixer) - : _vm(vm), _mixer(mixer), _currentVocFile(0), _vocHandle(), _compressHandle(), + : _vm(vm), _mixer(mixer), _currentVocFile(0), _vocHandle(), _musicEnabled(1), _sfxEnabled(true), _soundDataList(0) { } @@ -56,14 +56,10 @@ void Sound::voicePlay(const char *file) { strcpy(filenamebuffer, file); strcat(filenamebuffer, _supportedCodes[i].fileext); - _compressHandle.close(); - _vm->resource()->getFileHandle(filenamebuffer, &fileSize, _compressHandle); - if (!_compressHandle.isOpen()) + Common::SeekableReadStream *stream = _vm->resource()->getFileStream(filenamebuffer); + if (!stream) continue; - - Common::MemoryReadStream *tmp = _compressHandle.readStream(fileSize); - assert(tmp); - _currentVocFile = _supportedCodes[i].streamFunc(tmp, true, 0, 0, 1); + _currentVocFile = _supportedCodes[i].streamFunc(stream, true, 0, 0, 1); found = true; break; } |