[Scummvm-cvs-logs] SF.net SVN: scummvm:[43235] scummvm/trunk/engines/scumm/sound.cpp

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Tue Aug 11 01:01:11 CEST 2009


Revision: 43235
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43235&view=rev
Author:   mthreepwood
Date:     2009-08-10 23:01:11 +0000 (Mon, 10 Aug 2009)

Log Message:
-----------
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.

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/sound.cpp

Modified: scummvm/trunk/engines/scumm/sound.cpp
===================================================================
--- scummvm/trunk/engines/scumm/sound.cpp	2009-08-10 22:54:45 UTC (rev 43234)
+++ scummvm/trunk/engines/scumm/sound.cpp	2009-08-10 23:01:11 UTC (rev 43235)
@@ -391,8 +391,8 @@
 		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 @@
 
 		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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list