[Scummvm-cvs-logs] CVS: scummvm/backends/midi/mt32 synth.cpp,1.11,1.12

Pawel Kolodziejski aquadran at users.sourceforge.net
Sat Oct 23 06:40:04 CEST 2004


Update of /cvsroot/scummvm/scummvm/backends/midi/mt32
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30160/backends/midi/mt32

Modified Files:
	synth.cpp 
Log Message:
fixed warnings

Index: synth.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/mt32/synth.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- synth.cpp	23 Oct 2004 13:23:46 -0000	1.11
+++ synth.cpp	23 Oct 2004 13:39:02 -0000	1.12
@@ -2769,11 +2769,11 @@
 
 	//LOG_MSG("MT-32 Initializing Pitch Tables");
 	for(f=-108;f<109;f++) {
-		keytable[f+108] = (int)(256 * pow((float)2,(float)f/24.0));
+		keytable[f + 108] = (int)(256 * pow((float)2, (float)f / (float)24.0));
 		//LOG_MSG("KT %d = %d", f, keytable[f+108]);
 
 	}
-	float ff;
+	float ff = 0;
 	for(f=0;f<=101;f++) {
 		ff = (float)f/100.00;
 		sqrtable[f] = (int)(100*sqrt(ff));
@@ -3012,7 +3012,7 @@
 	fp.close();
 
 	int j,res;
-	float fres, tres;
+	float fres = 0, tres = 0;
 	for(res=0;res<31;res++) {
 		fres = (float)res/30.0;
 		ResonFactor[res] = (pow((float)2,log(pow((float)fres,(float)16))) * 2.5)+1.0;
@@ -4244,7 +4244,7 @@
 
 int CSynthMT32::DumpSysex(char *filename) {
 	File fp;
-	char tmpc;
+	byte tmpc;
 	fp.open(filename,File::kFileWriteMode);
 	if(!fp.isOpen())
 		return -1;





More information about the Scummvm-git-logs mailing list