[Scummvm-cvs-logs] SF.net SVN: scummvm: [28759] scummvm/trunk/engines/agi

buddha_ at users.sourceforge.net buddha_ at users.sourceforge.net
Tue Aug 28 12:41:26 CEST 2007


Revision: 28759
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28759&view=rev
Author:   buddha_
Date:     2007-08-28 03:41:25 -0700 (Tue, 28 Aug 2007)

Log Message:
-----------
Fix relative pitch handling (It's signed, was interpreted as unsigned before).

Modified Paths:
--------------
    scummvm/trunk/engines/agi/sound.cpp
    scummvm/trunk/engines/agi/sound.h

Modified: scummvm/trunk/engines/agi/sound.cpp
===================================================================
--- scummvm/trunk/engines/agi/sound.cpp	2007-08-27 14:22:24 UTC (rev 28758)
+++ scummvm/trunk/engines/agi/sound.cpp	2007-08-28 10:41:25 UTC (rev 28759)
@@ -139,7 +139,7 @@
 	mode    = (packedModeByte >> 1) & 3; // Bits 1-2
 	halt    = (packedModeByte & 1) != 0; // Bit 0 (Converted to boolean)
 
-	relPitch = stream.readUint16LE();
+	relPitch = stream.readSint16LE();
 
 	// Zero the wave address if we want to ignore the wave address info
 	if (ignoreAddr)

Modified: scummvm/trunk/engines/agi/sound.h
===================================================================
--- scummvm/trunk/engines/agi/sound.h	2007-08-27 14:22:24 UTC (rev 28758)
+++ scummvm/trunk/engines/agi/sound.h	2007-08-28 10:41:25 UTC (rev 28759)
@@ -102,7 +102,7 @@
 #define OSC_MODE_SWAP     3
 	uint mode;
 	bool halt;
-	uint16 relPitch; ///< 8b.8b fixed point, big endian?
+	int16 relPitch; ///< Relative pitch in semitones (Signed 8b.8b fixed point)
 
 	/** Reads an Apple IIGS wave information structure from the given stream. */
 	bool read(Common::SeekableReadStream &stream, bool ignoreAddr = false);


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