aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMatthew Hoops2009-08-10 23:01:11 +0000
committerMatthew Hoops2009-08-10 23:01:11 +0000
commit753f6cf587206b99dec1ec801d46c66bb9586819 (patch)
treee6994f6af1beb587c3f93daa3844eb39a4a8442c /engines/scumm
parenteb214d198f8ae79db32da543256ae1253efbf364 (diff)
downloadscummvm-rg350-753f6cf587206b99dec1ec801d46c66bb9586819.tar.gz
scummvm-rg350-753f6cf587206b99dec1ec801d46c66bb9586819.tar.bz2
scummvm-rg350-753f6cf587206b99dec1ec801d46c66bb9586819.zip
Provide a better detection method for Indy3 Mac sound effects. This fixes sounds such as the music that plays when Indy uses the whip on the hook in the giant cork. This also is a proper fix for bug #1852635 -- Sound 54 is actually not a sound effect.
svn-id: r43235
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/sound.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 2362427779..528cceb0cc 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -391,8 +391,8 @@ void Sound::playSound(int soundID) {
000070: 01 18 5a 00 10 00 02 28 5f 00 01 00 00 00 00 00 |..Z....(_.......|
*/
}
- else if ((_vm->_game.platform == Common::kPlatformMacintosh) && (_vm->_game.id == GID_INDY3) && (ptr[26] == 0)) {
- // Sound fomat as used in Indy3 EGA Mac.
+ else if ((_vm->_game.platform == Common::kPlatformMacintosh) && (_vm->_game.id == GID_INDY3) && READ_BE_UINT16(ptr + 8) == 0x1C) {
+ // Sound format as used in Indy3 EGA Mac.
// It seems to be closely related to the Amiga format, see player_v3a.cpp
// The following is known:
// offset 0, 16 LE: total size
@@ -411,8 +411,8 @@ void Sound::playSound(int soundID) {
flags = Audio::Mixer::FLAG_AUTOFREE;
size = READ_BE_UINT16(ptr + 12);
- if (size == 0) // WORKAROUND bug #1852635: Sound 54 has size 0.
- return;
+ assert(size);
+
rate = 3579545 / READ_BE_UINT16(ptr + 20);
sound = (char *)malloc(size);
int vol = ptr[24] * 4;