[AD] Further MIDI fix

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


You may remember that about a year ago now a MIDI fix was added to Allegro,
to use the All Sound Off command when a tune ended.

However, there are still some residual issues if a controller was in use
(eg. sustain) since these are not cancelled at the end of one song and can
affect the next one.

The proposed fix is to the reset_controllers method in midi.c:

   if (midi_driver->raw_midi) {
      midi_driver->raw_midi(0xB0+channel);
      midi_driver->raw_midi(10);
      midi_driver->raw_midi(midi_channel[channel].pan);
+      /* All Controllers Off */
+      midi_driver->raw_midi(0xB0+channel);
+      midi_driver->raw_midi(121);
+      midi_driver->raw_midi(0);
   }

Any opinions?

cheers,
chris






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