Re: [AD] MIDI player missing sustain

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> I commited it to trunk and branch. If it turns out that it has
> unexpected  effects, we'll revert it.

There's one other change I just realised we have to make, that means the
sound gets properly muted when stop_midi is called. Without this patch, any
sustained notes will continue playing after the user stops the track:

Around line 558 of midi.c (top of all_notes_off function):
    if (midi_driver->raw_midi) {
+      midi_driver->raw_midi(0xB0+channel);
+      midi_driver->raw_midi(120);
+      midi_driver->raw_midi(0);
       midi_driver->raw_midi(0xB0+channel);
       midi_driver->raw_midi(123);
       midi_driver->raw_midi(0);
       return;
    }

This sends the All Sound Off as well as All Notes Off command to the MIDI
driver, to ensure it mutes everything properly.

> [Please don't start a new thread by answering to a message.]

Ah ok sorry, it's just an easy way to get the right To address ;-)

Cheers,
Chris







Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/