[Scummvm-cvs-logs] CVS: scummvm/sky/music gmmusic.cpp,1.22,1.23

Eugene Sandulenko sev at users.sourceforge.net
Sat Mar 12 03:34:36 CET 2005


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

Modified Files:
	gmmusic.cpp 
Log Message:
Slighy modified patch #1161756 "Patch for external / non-volatile GMIDI synths". Thanks, __tom.


Index: gmmusic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/music/gmmusic.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- gmmusic.cpp	28 Jan 2005 22:05:48 -0000	1.22
+++ gmmusic.cpp	12 Mar 2005 11:34:10 -0000	1.23
@@ -48,9 +48,11 @@
 
 	_midiDrv->setTimerCallback(NULL, NULL);
 	if (_currentMusic) stopMusic();
-	// Send All Notes Off (for external synths)
-	for (int i = 0; i < 16; ++i)
+	// Send All Sound Off and All Notes Off (for external synths)
+	for (int i = 0; i < 16; ++i) {
+		_midiDrv->send ((120 << 8) | 0xB0 | i);
 		_midiDrv->send ((123 << 8) | 0xB0 | i);
+	}
 	_midiDrv->close();
 	delete _midiDrv;
 }
@@ -93,7 +95,9 @@
 }
 
 void GmMusic::startDriver(void) {
-
+	// Send GM System On to reset channel parameters on external and capa$
+	uint8 sysEx[] = "\xf0\x7e\x7f\x09\x01\xf7";
+	_midiDrv->sysEx(sysEx, 6);
 	//_midiDrv->send(0xFF);  //ALSA can't handle this.
 	// skip all sysEx as it can't be handled anyways.
 }





More information about the Scummvm-git-logs mailing list