This section gives the required and optional messages for MIDI output device drivers. See “Audio Device Driver Reference,” later in this chapter, for detailed information on these messages.
The modMessage entry-point function for MIDI output drivers must support the following messages.
Closes and deallocates a MIDI output device.
Sends a MIDI event to the driver for output. This message is used for all MIDI events, except system-exclusive events.
Requests the capabilities of a MIDI output device.
Requests the number of MIDI output devices a driver supports.
Sends a MIDI data block to the driver for output. The data block can contain one or more MIDI events, including system-exclusive events.
Opens and allocates a MIDI output device.
Stops playback and returns all data blocks to the client application.
The modMessage entry-point function for MIDI output drivers can optionally support the following messages, depending on the capabilities of the target hardware.
Requests the current volume level setting. This message is used only by internal synthesizer devices.
Requests that the driver prepare a data block for playback.
Sets the volume level. This message is used only by internal synthesizer devices.
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 output 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 finishes with a system-exclusive data block and returns it to the client.
Notifies a client application when a device is opened.