The wodMessage Entry Point for Waveform Output Drivers

A waveform output driver must have an entry-point function named wodMessage to process messages sent by MMSYSTEM. The syntax of wodMessage is as follows:

DWORD wodMessage(uDeviceID, uMsg, dwUser, dwParam1, dwParam2)

The uDeviceID parameter is a UINT specifying an ID for the target device. Device IDs are sequential, starting at zero and ending at a value equal to one less than the number of devices the driver supports.

The uMsg parameter is a UINT specifying the message being sent to the driver. The driver should return MMSYSERR_NOTSUPPORTED if it does not support the specified message.

The dwUser parameter is a DWORD of instance information for use by the driver. The driver should fill this location with its instance data (for example, with a far pointer to a data structure). For any other messages, the instance data is returned to the driver. Drivers supporting multiple clients can use this instance data to track which client is associated with the message.

The dwParam1 and dwParam2 parameters are message-dependent.

The low-order word of the return value specifies a message-dependent return value or error code. The high-order word should be zero.

Playing Contiguous Data Blocks

Waveform audio data is often passed to waveform device drivers in multiple data blocks. If a driver is playing a waveform data block and it receives additional data blocks, it must be able to play these contiguous data blocks without audible gaps in the audio output.