[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.173,1.174

Travis Howell kirben at users.sourceforge.net
Thu Jul 17 23:00:29 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv8979/scumm

Modified Files:
	sound.cpp 
Log Message:

Add 22KHz sounds effect support for fm towns games, patch #773434 


Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -d -r1.173 -r1.174
--- sound.cpp	18 Jul 2003 05:49:21 -0000	1.173
+++ sound.cpp	18 Jul 2003 05:59:32 -0000	1.174
@@ -384,7 +384,7 @@
 			WA probably again contains audio data?
 			*/
 #endif
-			rate = 11000;
+			rate = 11025;
 			int type = *(ptr + 0x0D);
 
 			switch(type) {
@@ -392,6 +392,7 @@
 					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 @@
 						}
 					}
 
-					_scumm->_mixer->playRaw(NULL, sound, waveSize, 11000, flags, soundID);
+					_scumm->_mixer->playRaw(NULL, sound, waveSize, rate, flags, soundID);
 					break;
 				}
 





More information about the Scummvm-git-logs mailing list