diff options
author | James Brown | 2002-05-07 11:48:34 +0000 |
---|---|---|
committer | James Brown | 2002-05-07 11:48:34 +0000 |
commit | e2df4d2b3bfc9fc9f6b3e6de2d5c02ff3178022b (patch) | |
tree | f760bac2a616348d9482eace191ace7d5611208d | |
parent | 5a4ed65edaa236f372633ee5596c3c77c8317a9d (diff) | |
download | scummvm-rg350-e2df4d2b3bfc9fc9f6b3e6de2d5c02ff3178022b.tar.gz scummvm-rg350-e2df4d2b3bfc9fc9f6b3e6de2d5c02ff3178022b.tar.bz2 scummvm-rg350-e2df4d2b3bfc9fc9f6b3e6de2d5c02ff3178022b.zip |
Added rate detection for The Dig - solves problems with other language versions.
svn-id: r4226
-rw-r--r-- | sound.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -760,6 +760,7 @@ void Scumm::decompressBundleSound(int index) { } { /* Parse decompressed data */ + int rate = 22050; byte *ptr = CompFinal; int tag, size; tag = READ_BE_UINT32(ptr); ptr+=4; @@ -770,10 +771,13 @@ void Scumm::decompressBundleSound(int index) { } ptr+=12; /* Skip header */ - while(tag != MKID_BE('DATA')) { + while(tag != MKID_BE('DATA')) { tag = READ_BE_UINT32(ptr); ptr+=4; switch(tag) { - case MKID_BE('FRMT'): + case MKID_BE('FRMT'): + size = READ_BE_UINT32(ptr); ptr+=16; + rate = READ_BE_UINT32(ptr); ptr+=8; + break; case MKID_BE('TEXT'): case MKID_BE('REGN'): case MKID_BE('STOP'): @@ -791,7 +795,7 @@ void Scumm::decompressBundleSound(int index) { Final = (unsigned char *)malloc(size); memcpy(&Final[0], &ptr[0], size); - _mixer->play_raw(NULL, Final, size, 22050, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE); + _mixer->play_raw(NULL, Final, size, rate, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE); free(CompFinal); } } |