Entry-Point Functions

In addition to the installable driver entry-point function, DriverProc, an audio device driver must have at least one of the following entry-point functions:

wodMessage for waveform output drivers

widMessage for waveform input drivers

modMessage for MIDI output drivers and internal synthesizer drivers

midMessage for MIDI input drivers

auxMessage for auxiliary audio drivers

Drivers that service more than one type of audio device must have one of the above entry-point functions for each type of device serviced.

These functions process messages sent by MMSYSTEM to the driver as the result of an application call to a low-level audio function. For example, when an application opens a waveform output device with the waveOutOpen function, MMSYSTEM sends the specified waveform output device driver a WODM_OPEN message. The driver's wodMessage function receives and processes this message. See the sections about writing drivers for specific types of audio devices later in this chapter for the exact syntax of each of these entry-point functions.

Reentrancy Considerations with Entry-Point Functions

The auxMessage, widMessage, wodMessage, and midMessage entry-point functions are not called at interrupt time and therefore do not have to be written to be reentrant. However, the entry-point function for MIDI output devices, modMessage, can be called at interrupt time. See “Writing a MIDI Output Driver,” later in this chapter, for details on making this entry-point function reentrant.