diff options
author | Martin Kiewitz | 2010-05-01 14:04:48 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-05-01 14:04:48 +0000 |
commit | e3ac8713e3718bff97858d25b5a98048357867f1 (patch) | |
tree | e556de1e74d54369e1ad975d689d957d2e6cbfaf /engines | |
parent | 45debce66eff7e57e71b83f8d1c4dd2066636355 (diff) | |
download | scummvm-rg350-e3ac8713e3718bff97858d25b5a98048357867f1.tar.gz scummvm-rg350-e3ac8713e3718bff97858d25b5a98048357867f1.tar.bz2 scummvm-rg350-e3ac8713e3718bff97858d25b5a98048357867f1.zip |
SCI: fix bugs in audio decompression (mp3, ogg, flac)
svn-id: r48880
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/resource.cpp | 4 | ||||
-rw-r--r-- | engines/sci/sound/audio.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 076575bbfb..02d8e62137 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -285,8 +285,8 @@ void ResourceManager::checkIfAudioVolumeIsCompressed(ResourceSource *source) { uint32 recordCount = file->readUint32LE(); if (!recordCount) error("compressed audio volume doesn't contain any entries!"); - source->audioCompressionOffsetMapping = new int32[(recordCount + 1) * 4 * 2]; - file->read(&source->audioCompressionOffsetMapping, recordCount * 4 * 2); + source->audioCompressionOffsetMapping = new int32[(recordCount + 1) * 2]; + file->read(source->audioCompressionOffsetMapping, recordCount * 4 * 2); // Put ending zero source->audioCompressionOffsetMapping[recordCount * 2] = 0; source->audioCompressionOffsetMapping[recordCount * 2 + 1] = file->size(); diff --git a/engines/sci/sound/audio.cpp b/engines/sci/sound/audio.cpp index 96a3f1c577..40e6f2e03e 100644 --- a/engines/sci/sound/audio.cpp +++ b/engines/sci/sound/audio.cpp @@ -236,17 +236,17 @@ Audio::RewindableAudioStream *AudioPlayer::getAudioStream(uint32 number, uint32 switch (audioCompressionType) { case MKID_BE('MP3 '): #ifdef USE_MAD - audioStream = Audio::makeMP3Stream(compressedStream, DisposeAfterUse::YES); + audioStream = Audio::makeMP3Stream(compressedStream, DisposeAfterUse::NO); #endif break; case MKID_BE('OGG '): #ifdef USE_VORBIS - audioStream = Audio::makeVorbisStream(compressedStream, DisposeAfterUse::YES); + audioStream = Audio::makeVorbisStream(compressedStream, DisposeAfterUse::NO); #endif break; case MKID_BE('FLAC'): #ifdef USE_FLAC - audioStream = Audio::makeFLACStream(compressedStream, DisposeAfterUse::YES); + audioStream = Audio::makeFLACStream(compressedStream, DisposeAfterUse::NO); #endif break; } |