I have to follow up to myself, since there were two pretty embarassing bugs in the version I sent. (includes were wrong, and value wasn't converted to int)
rainer -- Binary/unsupported file stripped by Listar -- -- Type: APPLICATION/octet-stream -- File: midiout_sgimd.c.gz -- Desc: midiout_sgimd.c.gz
