aboutsummaryrefslogtreecommitdiff
path: root/sky
diff options
context:
space:
mode:
authorEugene Sandulenko2005-03-12 11:34:10 +0000
committerEugene Sandulenko2005-03-12 11:34:10 +0000
commit4493b064dd78bab03f2e7b75bf50934b9cab39a6 (patch)
tree7b8743564fe8adb2cc72ea53bc8fd42ef1c3106c /sky
parent7ee1a2d4955d19010cf3520b75b0769ee3b48666 (diff)
downloadscummvm-rg350-4493b064dd78bab03f2e7b75bf50934b9cab39a6.tar.gz
scummvm-rg350-4493b064dd78bab03f2e7b75bf50934b9cab39a6.tar.bz2
scummvm-rg350-4493b064dd78bab03f2e7b75bf50934b9cab39a6.zip
Slighy modified patch #1161756 "Patch for external / non-volatile GMIDI synths". Thanks, __tom.
svn-id: r17091
Diffstat (limited to 'sky')
-rw-r--r--sky/music/gmmusic.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/sky/music/gmmusic.cpp b/sky/music/gmmusic.cpp
index 49f2796006..8863dbc5e1 100644
--- a/sky/music/gmmusic.cpp
+++ b/sky/music/gmmusic.cpp
@@ -48,9 +48,11 @@ GmMusic::~GmMusic(void) {
_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::setupChannels(uint8 *channelData) {
}
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.
}