Re: [AD] Midi input driver

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


At 11:09 PM 2/08/2004, you wrote:
On Monday 02 August 2004 14:58, aj wrote:
> i am *very* experienced in the win32 midi input system.
> i am NOT experienced in the allegro midi system.
>
> but i can review your patches, if you need a 2nd  opinion.

Please do.


line 119: of the midi input patch

119:   id = (midi_input_driver->id & 0xFF) - 'A';

concerns me, i understand what it does, but i have no access to the macro, as its in a CVS file i haven't got, however, from looking at the other similar macros, are you sure you are accessing the correct end of the ->id var by using 0xff
i have a vague idea that this might be an endian issue.

other than that, it looks like very nice code.
i eagerly await a chance to try it out.


the allegro4.1.15/docs  midi_recorder  say:

If set, this function is called by the MIDI input driver whenever a new byte of MIDI data becomes available. It runs in an interrupt context, so it must execute very quickly and all the code/data must be locked. This currently works only under DOS.


is that sufficient warning ?  as the MSDN docs for  midi_in_proc  say:

MSDN: "Applications should not call any system-defined functions from inside a callback function"

maybe the docs could say "On Windows further limitations may exist, refer to MSDN midi_in_proc()" althou somehow i dont think that is worded in the "allegro docs manner" ;) maybe you could word it better.


AJ




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