[Scummvm-cvs-logs] CVS: scummvm/sound mpu401.cpp,1.6,1.7 mpu401.h,1.6,1.7

Jamieson Christian jamieson630 at users.sourceforge.net
Fri May 16 14:07:01 CEST 2003


Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1:/tmp/cvs-serv31501/scummvm/sound

Modified Files:
	mpu401.cpp mpu401.h 
Log Message:
Added SysEx hooks

Index: mpu401.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mpu401.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- mpu401.cpp	30 Apr 2003 12:51:07 -0000	1.6
+++ mpu401.cpp	16 May 2003 21:05:57 -0000	1.7
@@ -74,6 +74,17 @@
 	}
 }
 
+void MidiDriver_MPU401::sysEx_customInstrument (byte channel, uint32 type, byte *instr) {
+	if (type != 'ROL ')
+		return;
+
+	// The SysEx stream for a Roland MT-32 instrument definition starts with
+	// the Roland manufacturer ID. So we just need to substitute the appropriate
+	// device # (i.e. channel), and go.
+	instr[1] = channel;
+	sysEx (instr, 253);
+}
+
 MidiChannel *MidiDriver_MPU401::allocateChannel() {
 	MidiChannel_MPU401 *chan;
 	uint i;

Index: mpu401.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mpu401.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- mpu401.h	6 Mar 2003 21:46:56 -0000	1.6
+++ mpu401.h	16 May 2003 21:05:58 -0000	1.7
@@ -90,6 +90,8 @@
 	void setTimerCallback(void *timer_param, void (*timer_proc) (void *));
 	uint32 getBaseTempo(void) { return 0x4A0000; }
 
+	virtual void sysEx_customInstrument (byte channel, uint32 type, byte *instr);
+
 	MidiChannel *allocateChannel();
 	MidiChannel *getPercussionChannel() { return &_midi_channels [9]; }
 };





More information about the Scummvm-git-logs mailing list