"midiInStart" and legacy virtual midi driver RRS feed

  • Question

  • I'm developing a midi (loopback) virtual driver step by step.

    Currently, when the IMiniportMidiStream's method "read" (associated with pin "midi in") gets called i fill the buffer with some fixed data (3 bytes).

    Testing the driver, if i don't call midiInStart, when the "Read" is issued, everything seem to be ok.

    If (after the midiInOpen calls with a callback function) i call midiInStart, the O.S. freezes.

    I notice that, in this case, an unexpected "Read" is issued. It's probably due to midiInStart.

    And i also notice that if, in the read call i report that 0 bytes was read (*BytesRead = 0) everything works except that the application callback function is not called (perhaps because, currently, i always return 0 bytes).

    The question is:

    Is that unexpected "Read" (by midiInStart,  i guess) normal and if it is, what does it expect to be returned?
    (In that call, the os freezes probably when filling its buffer)

    • Edited by BlueLed Tuesday, September 23, 2014 10:41 AM
    Tuesday, September 23, 2014 10:38 AM