diff options
author | Paweł Kołodziejski | 2002-08-31 09:50:36 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2002-08-31 09:50:36 +0000 |
commit | 3826c7c8a8fabf2bc0379de53b835b25adfa45c5 (patch) | |
tree | 27c90bec2ea5e2b7ebd4520500182ce993f8cb38 /scumm/sound.cpp | |
parent | bd7b93061b368ef4e1a45efbce2ef7110969512c (diff) | |
download | scummvm-rg350-3826c7c8a8fabf2bc0379de53b835b25adfa45c5.tar.gz scummvm-rg350-3826c7c8a8fabf2bc0379de53b835b25adfa45c5.tar.bz2 scummvm-rg350-3826c7c8a8fabf2bc0379de53b835b25adfa45c5.zip |
changed Bundle to File class, cleanup
svn-id: r4874
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r-- | scumm/sound.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 9b2e49b03b..67eedc7240 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -810,8 +810,10 @@ void Sound::playBundleMusic(int32 song) { if (_numberBundleMusic == -1) { sprintf(buf, "%s%smusic.bun", _scumm->getGameDataPath(), _scumm->_exe_name); - if (_scumm->_bundle->openMusicFile((char*)&buf) == false) + if (_scumm->_bundle->openMusicFile((char*)&buf) == false) { return; + } + _musicBundleBufFinal = (byte*)malloc(OUTPUT_SIZE); _musicBundleBufOutput = (byte*)malloc(10 * 0x2000); _currentSampleBundleMusic = 0; @@ -929,7 +931,10 @@ void Sound::playBundleSound(char *sound) { byte * ptr; sprintf(buf, "%s%svoice.bun", _scumm->getGameDataPath(), _scumm->_exe_name); - _scumm->_bundle->openVoiceFile((char*)&buf); + if (_scumm->_bundle->openVoiceFile((char*)&buf) == false) { + return; + } + ptr = (byte *)malloc(1000000); if (_scumm->_bundle->decompressVoiceSampleByName(sound, ptr) == 0) { delete ptr; |