diff options
author | Kari Salminen | 2007-08-02 11:39:45 +0000 |
---|---|---|
committer | Kari Salminen | 2007-08-02 11:39:45 +0000 |
commit | af16be07a1dad35993d06056cf072b03ee5c63e9 (patch) | |
tree | 287cb2a8f929657c19d091a967f661c5cae5684f | |
parent | 8299835cad43c4da9cc594647e805913fd95841a (diff) | |
download | scummvm-rg350-af16be07a1dad35993d06056cf072b03ee5c63e9.tar.gz scummvm-rg350-af16be07a1dad35993d06056cf072b03ee5c63e9.tar.bz2 scummvm-rg350-af16be07a1dad35993d06056cf072b03ee5c63e9.zip |
Added reading of volume parameter from Apple IIGS AGI sample header.
svn-id: r28405
-rw-r--r-- | engines/agi/sound.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp index f65839de97..ad8700bbe7 100644 --- a/engines/agi/sound.cpp +++ b/engines/agi/sound.cpp @@ -76,9 +76,11 @@ struct SoundInstrument { struct IIgsSampleHeader { uint16 type; uint8 pitch; ///< Logarithmic, base is 2**(1/12), unknown multiplier (Possibly in range 1040-1080) - uint8 unknown[5]; + uint8 unknown_Ofs3_Len1; + uint8 volume; ///< Current guess: Logarithmic in 6 dB steps + uint8 unknown_Ofs5_Len3[3]; uint16 size; - uint8 unknown2[44]; + uint8 unknown_Ofs10_Len44[44]; }; #if 0 @@ -101,9 +103,11 @@ bool readIIgsSampleHeader(IIgsSampleHeader &header, Common::SeekableReadStream & // Gold Rush's sample resource 60 (A looping sound of horse's hoof hitting // pavement) is the only one that has 0x7F at header offset 3, all other // samples have 0x00 there. - stream.read(header.unknown, 5); + header.unknown_Ofs3_Len1 = stream.readByte(); + header.volume = stream.readByte(); + stream.read(header.unknown_Ofs5_Len3, 3); header.size = stream.readUint16LE(); - stream.read(header.unknown2, 44); + stream.read(header.unknown_Ofs10_Len44, 44); return !stream.ioFailed(); } else // No room in the stream for the header, so failure return false; |