This section gives the required and optional messages for MIDI input device drivers. See “Audio Device Driver Reference,” later in this chapter, for detailed information on these messages. The midMessage entry-point function for MIDI input drivers must support the following messages.
Adds a buffer to the input queue.
Closes and deallocates a MIDI input device.
Requests the capabilities of a MIDI input device.
Requests the number of MIDI input devices a driver supports.
Opens and allocates a MIDI input device.
Stops output and returns all data blocks to the client application.
Begins MIDI input and resets the time stamp to zero.
Ends MIDI input.
The midMessage entry-point function for MIDI input drivers may support the following messages, depending on whether the driver requires special preparation to client data buffers.
Requests that the driver prepare a data block for playback.
Requests that a driver clean up the preparation previously done on a data block.
In addition to receiving messages, drivers must notify clients when certain events occur. MIDI input drivers notify clients by sending one of the following messages using the DriverCallback function.
Notifies a client application when a device is closed.
Notifies a client application when the driver receives a complete MIDI event and is sending the event to the client.
Notifies a client application when the driver receives an incomplete MIDI event.
Notifies the client application when the driver returns a buffer with system-exclusive data to the client.
Notifies the client application when the driver encounters an error while receiving system-exclusive data.
Notifies a client application when a device is opened.