aboutsummaryrefslogtreecommitdiff
path: root/sound/mididrv.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2010-09-15 22:00:20 +0000
committerJohannes Schickel2010-09-15 22:00:20 +0000
commit6588398ce6fab85e287b10c2781d3797d7639cb9 (patch)
tree68bb65c1d3363aff0d66313661822a9040090236 /sound/mididrv.cpp
parentbb5db4aa3b67c7270b208fe43d829906f7409b63 (diff)
downloadscummvm-rg350-6588398ce6fab85e287b10c2781d3797d7639cb9.tar.gz
scummvm-rg350-6588398ce6fab85e287b10c2781d3797d7639cb9.tar.bz2
scummvm-rg350-6588398ce6fab85e287b10c2781d3797d7639cb9.zip
MIDI: Send a reset MIDI device signal on startup.
This is currently done in the engine code. I adapted AGI, AGOS, DRACI, GROOVIE, LURE, MADE, QUEEN, SAGA, SKY, TINSEL and TOUCHE to send a reset device on startup. The sound output still works fine (started up a game from every engine), so this should hopefully not introduce any regressions. As far as I can tell it seems that SCUMM does send a proper device reset, so I did not touch it. KYRA only sends a proper reset for MT-32 currently. I am not sure about SCI though. This fixes bug #3066826 "SIMON: MIDI notes off when using RTL after SCI". svn-id: r52736
Diffstat (limited to 'sound/mididrv.cpp')
-rw-r--r--sound/mididrv.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp
index eb8bafee01..b93df19558 100644
--- a/sound/mididrv.cpp
+++ b/sound/mididrv.cpp
@@ -306,3 +306,16 @@ MidiDriver::DeviceHandle MidiDriver::getDeviceHandle(const Common::String &ident
return 0;
}
+
+void MidiDriver::sendMT32Reset() {
+ static const byte resetSysEx[] = { 0x41, 0x10, 0x16, 0x12, 0x7F, 0x00, 0x00, 0x01, 0x00 };
+ sysEx(resetSysEx, sizeof(resetSysEx));
+ g_system->delayMillis(100);
+}
+
+void MidiDriver::sendGMReset() {
+ static const byte resetSysEx[] = { 0x7E, 0x7F, 0x09, 0x01 };
+ sysEx(resetSysEx, sizeof(resetSysEx));
+ g_system->delayMillis(100);
+}
+