mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-22 01:57:16 +00:00
Correct HSHD sounds
svn-id: r14995
This commit is contained in:
parent
f16ee4dfaf
commit
71866c1287
@ -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;
|
||||
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);
|
||||
}
|
||||
|
||||
// TODO - discover what data the first chunk, HSHD, contains
|
||||
// it might be useful here.
|
||||
rate = READ_LE_UINT16(ptr + 22 - diff);
|
||||
|
||||
ptr += 8 + READ_BE_UINT32(ptr + 12 - diff);
|
||||
if (READ_UINT32(ptr) != MKID('SDAT'))
|
||||
return; // abort
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user