diff options
author | Travis Howell | 2004-09-10 12:07:53 +0000 |
---|---|---|
committer | Travis Howell | 2004-09-10 12:07:53 +0000 |
commit | 71866c1287d35bb88b4d9dc048b296cc84bafb32 (patch) | |
tree | 4577df3524b8963e6bc2a1ebd1e329083e609115 | |
parent | f16ee4dfafca5d78d1b924645eb5dfc0205b8908 (diff) | |
download | scummvm-rg350-71866c1287d35bb88b4d9dc048b296cc84bafb32.tar.gz scummvm-rg350-71866c1287d35bb88b4d9dc048b296cc84bafb32.tar.bz2 scummvm-rg350-71866c1287d35bb88b4d9dc048b296cc84bafb32.zip |
Correct HSHD sounds
svn-id: r14995
-rw-r--r-- | scumm/sound.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 5ec777af0e..da49fdbc62 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -257,14 +257,14 @@ void Sound::playSound(int soundID, int offset) { } // Support for Putt-Putt sounds - very hackish, too 8-) else if (READ_UINT32(ptr) == MKID('DIGI') || READ_UINT32(ptr) == MKID('TALK') || READ_UINT32(ptr) == MKID('HSHD')) { - // Later game start have 8 less - int diff = (READ_UINT32(ptr) == MKID('HSHD')) ? 8 : 0; - - // TODO - discover what data the first chunk, HSHD, contains - // it might be useful here. - rate = READ_LE_UINT16(ptr + 22 - diff); + if (READ_UINT32(ptr) == MKID('HSHD')) { + rate = READ_LE_UINT16(ptr + 14); + ptr += READ_BE_UINT32(ptr + 4); + } else { + rate = READ_LE_UINT16(ptr + 22); + ptr += 8 + READ_BE_UINT32(ptr + 12); + } - ptr += 8 + READ_BE_UINT32(ptr + 12 - diff); if (READ_UINT32(ptr) != MKID('SDAT')) return; // abort |