aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2003-07-18 05:59:32 +0000
committerTravis Howell2003-07-18 05:59:32 +0000
commit8fbb8a6df898e2cfffe0007aadc001e14032121b (patch)
tree0635c8f8a94e3e73a71b8d7a25c69bf4bcd4da03 /scumm
parentf20c47bb216210ed681d3d24698de90821de2703 (diff)
downloadscummvm-rg350-8fbb8a6df898e2cfffe0007aadc001e14032121b.tar.gz
scummvm-rg350-8fbb8a6df898e2cfffe0007aadc001e14032121b.tar.bz2
scummvm-rg350-8fbb8a6df898e2cfffe0007aadc001e14032121b.zip
Add 22KHz sounds effect support for fm towns games, patch #773434
svn-id: r9063
Diffstat (limited to 'scumm')
-rw-r--r--scumm/sound.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index 37dd6c5f88..abe47dac6d 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -384,7 +384,7 @@ void Sound::playSound(int soundID) {
WA probably again contains audio data?
*/
#endif
- rate = 11000;
+ rate = 11025;
int type = *(ptr + 0x0D);
switch(type) {
@@ -392,6 +392,7 @@ void Sound::playSound(int soundID) {
int waveSize = READ_LE_UINT32(ptr + 0x22);
int loopStart = READ_LE_UINT32(ptr + 0x26);
int loopEnd = READ_LE_UINT32(ptr + 0x2A);
+ rate = (READ_LE_UINT32(ptr + 0x32) == 60) ? 11025 : 22050; // 48 means 22050
if (size - 0x36 < waveSize) {
warning("Wrong wave size in sound #%i: %i", soundID, waveSize);
@@ -415,7 +416,7 @@ void Sound::playSound(int soundID) {
}
}
- _scumm->_mixer->playRaw(NULL, sound, waveSize, 11000, flags, soundID);
+ _scumm->_mixer->playRaw(NULL, sound, waveSize, rate, flags, soundID);
break;
}