> We are trying to get a notification when the current MIDI device gets disconnected.

This sounds like a function that should be added to PortMidi. My initial thought is that the read request (which the caller is practically required to poll) could return an error code indicating the port is disconnected.

I'm not sure what windows actually does when a device is disconnected. I can look into it, but if you're experimenting already, you might look in pmwinmm.c at winmm_in_callback -- there are some unhandled cases (MIM_CLOSE, MIM_ERROR, MIM_LONG_ERROR, default, ...) that might occur upon disconnect. Let me know if you find anything -- my experience and the origins of this code go back to pre-USB devices that you couldn't disconnect, so I haven't really though about this.

-Roger

_______________________________________________
media_api mailing list
[email protected]
http://www.create.ucsb.edu/mailman/listinfo/media_api

Reply via email to