[Scummvm-cvs-logs] CVS: scummvm/sound mididrv.cpp,1.5,1.6

Max Horn fingolfin at users.sourceforge.net
Tue Sep 24 16:46:04 CEST 2002


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

Modified Files:
	mididrv.cpp 
Log Message:
removed even the last traces of Scumm dependencies from NewGUI. Yes, you heard right NewGUI is now 100% Scumm free and we can go for the launcher/message dialogs!

Index: mididrv.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mididrv.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- mididrv.cpp	17 Sep 2002 04:41:46 -0000	1.5
+++ mididrv.cpp	24 Sep 2002 23:45:25 -0000	1.6
@@ -87,7 +87,7 @@
 }
 
 void CALLBACK MidiDriver_WIN::midi_callback(HMIDIOUT hmo, UINT wMsg,
-																						DWORD dwInstance, DWORD dwParam1, DWORD dwParam2)
+                                            DWORD dwInstance, DWORD dwParam1, DWORD dwParam2)
 {
 
 	switch (wMsg) {
@@ -111,13 +111,26 @@
 		MMRESULT res = midiOutOpen((HMIDIOUT *) & _mo, MIDI_MAPPER, NULL, NULL, 0);
 		if (res != MMSYSERR_NOERROR)
 			check_error(res);
+
+		// Send initial pitch bend sensitivity values for +/- 12 semitones.
+		// For information on control change registered parameters,
+		// which includes the Pitch Bend sensitivity settings,
+		// visit http://www.midi.org/about-midi/table3.htm,
+		// Table 3a.
+		int chan;
+		for (chan = 0; chan < 16; ++chan) {
+			send(( 0 << 16) | (101 << 8) | (0xB0 | chan));
+			send(( 0 << 16) | (100 << 8) | (0xB0 | chan));
+			send((12 << 16) | (  6 << 8) | (0xB0 | chan));
+			send(( 0 << 16) | ( 38 << 8) | (0xB0 | chan));
+		} // next for
 	} else {
 		/* streaming mode */
 		MIDIPROPTIMEDIV mptd;
 		UINT _midi_device_id = 0;
 
 		check_error(midiStreamOpen(&_ms, &_midi_device_id, 1,
-															 (uint32)midi_callback, (uint32)this, CALLBACK_FUNCTION));
+                                   (uint32)midi_callback, (uint32)this, CALLBACK_FUNCTION));
 
 		prepare();
 





More information about the Scummvm-git-logs mailing list