[Scummvm-cvs-logs] CVS: scummvm/sound imuse.cpp,1.30,1.31 mididrv.cpp,1.16,1.17

James Brown ender at users.sourceforge.net
Thu May 2 07:48:06 CEST 2002


Update of /cvsroot/scummvm/scummvm/sound
In directory usw-pr-cvs1:/tmp/cvs-serv31624

Modified Files:
	imuse.cpp mididrv.cpp 
Log Message:
Change default tempos.



Index: imuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/imuse.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- imuse.cpp	29 Apr 2002 11:48:33 -0000	1.30
+++ imuse.cpp	2 May 2002 14:47:17 -0000	1.31
@@ -560,7 +560,7 @@
 #ifdef _WIN32_WCE
 		return 0x1F0000 * 2;	// Sampled down to 11 kHz
 #else //_WIN32_WCE
-		return 0x1924E0;
+		return 0x1F0000;			// Was: 0x1924E0;
 #endif //_WIN32_WCE
 	}
 
@@ -618,7 +618,7 @@
 
 	static int midi_driver_thread(void *param);
 
-	uint32 get_base_tempo() { return 0x400000; }
+	uint32 get_base_tempo() { return 0x460000; }
 	byte get_hardware_type() { return 5; }
 };
 
@@ -1348,7 +1348,7 @@
 			return stop_all_sounds();
 		case 13:
 			return get_sound_status(b);
-		case 14:
+		case 14:		
 			return stop_sound(b); //FIXME  should be something like fade off
 		case 16:
 			return set_volchan(b, c);

Index: mididrv.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mididrv.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- mididrv.cpp	28 Apr 2002 00:32:00 -0000	1.16
+++ mididrv.cpp	2 May 2002 14:47:17 -0000	1.17
@@ -219,9 +219,21 @@
 }
 
 void MidiDriver_WIN::send(uint32 b) {
+    union { 
+        DWORD dwData; 
+        BYTE bData[4]; 
+    } u; 
+
 	if (_mode != MO_SIMPLE)
 		error("MidiDriver_WIN:send called but driver is not in simple mode");
-	check_error(midiOutShortMsg(_mo, b));
+	
+	u.bData[3] = (byte)((b & 0xFF000000) >> 24);
+	u.bData[2] = (byte)((b & 0x00FF0000) >> 16);
+	u.bData[1] = (byte)((b & 0x0000FF00) >> 8);
+	u.bData[0] = (byte)(b & 0x000000FF);
+
+	//printMidi(u.bData[0], u.bData[1], u.bData[2], u.bData[3]);
+	check_error(midiOutShortMsg(_mo, u.dwData));
 }
 
 void MidiDriver_WIN::pause(bool pause) {





More information about the Scummvm-git-logs mailing list