summaryrefslogtreecommitdiff
path: root/muse2/muse/midi.cpp
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2011-01-17 16:20:51 +0000
committerRobert Jonsson <spamatica@gmail.com>2011-01-17 16:20:51 +0000
commit5b205da5d042feb64161e24b61c50271c31d2292 (patch)
tree7450c5e72f331747cbfcab7fce2681f91ca1dd91 /muse2/muse/midi.cpp
parentdfc1ba699f837700a005a218da56e17016965f4d (diff)
fixed panic button and init crash
Diffstat (limited to 'muse2/muse/midi.cpp')
-rw-r--r--muse2/muse/midi.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/muse2/muse/midi.cpp b/muse2/muse/midi.cpp
index e339f29b..87e9ff32 100644
--- a/muse2/muse/midi.cpp
+++ b/muse2/muse/midi.cpp
@@ -636,8 +636,10 @@ void Audio::panic()
if (port == 0) // ??
continue;
for (int chan = 0; chan < MIDI_CHANNELS; ++chan) {
- port->sendEvent(MidiPlayEvent(0, i, chan, ME_CONTROLLER, CTRL_ALL_SOUNDS_OFF, 0));
- port->sendEvent(MidiPlayEvent(0, i, chan, ME_CONTROLLER, CTRL_RESET_ALL_CTRL, 0));
+ if (debugMsg)
+ printf("send all sound of to midi port %d channel %d\n", i, chan);
+ port->sendEvent(MidiPlayEvent(0, i, chan, ME_CONTROLLER, CTRL_ALL_SOUNDS_OFF, 0), true);
+ port->sendEvent(MidiPlayEvent(0, i, chan, ME_CONTROLLER, CTRL_RESET_ALL_CTRL, 0), true);
}
}
}