aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/sound.cpp14
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