mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 16:35:20 +00:00
Added rate detection for The Dig - solves problems with other language versions.
svn-id: r4226
This commit is contained in:
parent
5a4ed65eda
commit
e2df4d2b3b
10
sound.cpp
10
sound.cpp
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user