From 753f6cf587206b99dec1ec801d46c66bb9586819 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 10 Aug 2009 23:01:11 +0000 Subject: 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 --- engines/scumm/sound.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/scumm') 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; -- cgit v1.2.3