This section gives the required and optional messages for MIDI output device drivers. For detailed information on these messages, see the reference section later in this chapter. The modMessage entry-point function for MIDI output drivers must support the following messages.
MODM_CLOSE | Closes and deallocates a MIDI output device. |
MODM_DATA | Sends a MIDI event to the driver for output. This message is used for all MIDI events, except system-exclusive events. |
MODM_GETDEVCAPS | Requests the capabilities of a MIDI output device. |
MODM_GETNUMDEVS | Requests the number of MIDI output devices a driver supports. |
MODM_LONGDATA | Sends a MIDI data block to the driver for output. The data block can contain one or more MIDI events, including system-exclusive events. |
MODM_OPEN | Opens and allocates a MIDI output device. |
MODM_RESET | 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.
MODM_GETVOLUME | Requests the current volume level setting. This message is used only by internal synthesizer devices. |
MODM_PREPARE | Requests that the driver prepare a data block for playback. |
MODM_SETVOLUME | Sets the volume level. This message is used only by internal synthesizer devices. |
MODM_UNPREPARE | 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.
MOM_CLOSE | Notifies a client application when a device is closed. |
MOM_DONE | Notifies a client application when the driver finishes with a system-exclusive data block and returns it to the client. |
MOM_OPEN | Notifies a client application when a device is opened. |