From 5b205da5d042feb64161e24b61c50271c31d2292 Mon Sep 17 00:00:00 2001 From: Robert Jonsson Date: Mon, 17 Jan 2011 16:20:51 +0000 Subject: fixed panic button and init crash --- muse2/muse/midi.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'muse2/muse/midi.cpp') 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); } } } -- cgit v1.2.3