diff options
author | Kari Salminen | 2007-08-28 10:41:25 +0000 |
---|---|---|
committer | Kari Salminen | 2007-08-28 10:41:25 +0000 |
commit | a4780a8f823ea0ca0cf68f7b7b7b86d7e3b32eb4 (patch) | |
tree | e04b64b31cc333de17bcc358c6adb5745086802a | |
parent | a8149227bfb9306df212a0754e046cc62382fa54 (diff) | |
download | scummvm-rg350-a4780a8f823ea0ca0cf68f7b7b7b86d7e3b32eb4.tar.gz scummvm-rg350-a4780a8f823ea0ca0cf68f7b7b7b86d7e3b32eb4.tar.bz2 scummvm-rg350-a4780a8f823ea0ca0cf68f7b7b7b86d7e3b32eb4.zip |
Fix relative pitch handling (It's signed, was interpreted as unsigned before).
svn-id: r28759
-rw-r--r-- | engines/agi/sound.cpp | 2 | ||||
-rw-r--r-- | engines/agi/sound.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp index 63d204f98e..e080616972 100644 --- a/engines/agi/sound.cpp +++ b/engines/agi/sound.cpp @@ -139,7 +139,7 @@ bool IIgsWaveInfo::read(Common::SeekableReadStream &stream, bool ignoreAddr) { 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) diff --git a/engines/agi/sound.h b/engines/agi/sound.h index e075e9820e..d856b0cf5c 100644 --- a/engines/agi/sound.h +++ b/engines/agi/sound.h @@ -102,7 +102,7 @@ struct IIgsWaveInfo { #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); |