Notifying Clients from Audio Drivers

User-mode drivers are responsible for notifying clients upon the completion of various audio operations. Clients indicate the type of notification, if any, they expect when they open a driver instance for waveform, MIDI, or mixer operations. (Refer to MIDM_OPEN, MODM_OPEN, MXDM_OPEN, WIDM_OPEN, and WODM_OPEN messages.) Clients that request notification can specify any of the following notification targets:

Mixer drivers accept only window handles.

User-mode drivers notify clients by calling the DriverCallback function in winmm.dll. This function delivers a message to the client’s notification target. The function also delivers message parameters, if the target type accepts parameters.

Following are the messages user-mode drivers must send to a client if the client has requested notification:

Operations

Messages

Waveform Input

WIM_CLOSE
WIM_DATA
WIM_OPEN

Waveform Output

WOM_CLOSE
WOM_DONE
WOM_OPEN

MIDI Input

MIM_CLOSE
MIM_DATA
MIM_ERROR
MIM_LONGDATA
MIM_LONGERROR
MIM_MOREDATA
MIM_OPEN

MIDI Output

MOM_CLOSE
MOM_DONE
MOM_OPENMOM_POSITIONCB

Mixer

MM_MIXM_LINE_CHANGE
MM_MIXM_CONTROL_CHANGE