[Scummvm-cvs-logs] CVS: scummvm/sky sound.cpp,1.46,1.46.2.1

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Mon Feb 16 08:52:07 CET 2004


Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11208

Modified Files:
      Tag: branch-0-6-0
	sound.cpp 
Log Message:
Workaround for BASS bug #897775. As far as I can tell, there is not proper
way of fixing this. Please prove me wrong.


Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.cpp,v
retrieving revision 1.46
retrieving revision 1.46.2.1
diff -u -d -r1.46 -r1.46.2.1
--- sound.cpp	6 Jan 2004 12:45:32 -0000	1.46
+++ sound.cpp	16 Feb 2004 16:43:29 -0000	1.46.2.1
@@ -1231,8 +1231,18 @@
 
 	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;
 }
 





More information about the Scummvm-git-logs mailing list