Re: [AD] MIDI player missing sustain

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


> 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.

Do we need to add 'case 120' to process_controller() too?

-- 
Eric Botcazou




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