From 66f065d3d64d335b255deaef3b037c69f65d45c5 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 16 Feb 2004 16:51:44 +0000 Subject: Workaround for BASS bug #897775. As far as I can tell there is no proper fix for this bug, but please prove me wrong. svn-id: r12916 --- sky/sound.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sky') diff --git a/sky/sound.cpp b/sky/sound.cpp index 35e97a11c3..da6c8ad50d 100644 --- a/sky/sound.cpp +++ b/sky/sound.cpp @@ -1231,8 +1231,18 @@ bool Sound::startSpeech(uint16 textNum) { free(speechData); + // Workaround for BASS bug #897775 - some voice-overs are played at + // half speed in 0.0368 (the freeware CD version), in 0.0372 they sound + // just fine. + + uint rate; + if (_skyDisk->determineGameVersion() == 368 && (textNum == 20905 || textNum == 20906)) + rate = 22050; + else + rate = 11025; + _mixer->stopID(SOUND_SPEECH); - _mixer->playRaw(&_ingameSpeech, playBuffer, speechSize, 11025, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE, SOUND_SPEECH); + _mixer->playRaw(&_ingameSpeech, playBuffer, speechSize, rate, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE, SOUND_SPEECH); return true; } -- cgit v1.2.3