aboutsummaryrefslogtreecommitdiff
path: root/sound/mpu401.cpp
diff options
context:
space:
mode:
authorJamieson Christian2003-05-16 21:05:58 +0000
committerJamieson Christian2003-05-16 21:05:58 +0000
commit954049726374bd49ec226904268e8b8360eb0617 (patch)
treeeb6d24eb89e67c60c205f66dd35a2f89cafe6f81 /sound/mpu401.cpp
parent053e7cb71edb02abc9e260ff750a57ce337f7089 (diff)
downloadscummvm-rg350-954049726374bd49ec226904268e8b8360eb0617.tar.gz
scummvm-rg350-954049726374bd49ec226904268e8b8360eb0617.tar.bz2
scummvm-rg350-954049726374bd49ec226904268e8b8360eb0617.zip
Added SysEx hooks
svn-id: r7579
Diffstat (limited to 'sound/mpu401.cpp')
-rw-r--r--sound/mpu401.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/mpu401.cpp b/sound/mpu401.cpp
index 6c946ff686..3aab56e05d 100644
--- a/sound/mpu401.cpp
+++ b/sound/mpu401.cpp
@@ -74,6 +74,17 @@ MidiDriver_MPU401::MidiDriver_MPU401() : MidiDriver() {
}
}
+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;