From 8fbb8a6df898e2cfffe0007aadc001e14032121b Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 18 Jul 2003 05:59:32 +0000 Subject: Add 22KHz sounds effect support for fm towns games, patch #773434 svn-id: r9063 --- scumm/sound.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scumm') 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; } -- cgit v1.2.3