[Media_api] Device disconnected while playing
Roger Dannenberg
rbd at cs.cmu.edu
Thu Jun 21 10:50:50 PDT 2007
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.create.ucsb.edu/pipermail/media_api/attachments/20070621/bb1afaff/attachment.htm
More information about the media_api
mailing list