Waveform Input Driver Messages

This section gives the required and optional messages for waveform input device drivers. See “Audio Device Driver Reference,” later in this chapter, for detailed information on these messages.

The widMessage entry-point function for waveform input drivers must support the following messages.

Required Messages for Waveform Input Device Drivers

WIDM_ADDBUFFER

Adds a buffer to the input queue.

WIDM_CLOSE

Closes and deallocates a waveform input device.

WIDM_GETDEVCAPS

Requests the capabilities of a waveform input device.

WIDM_GETNUMDEVS

Requests the number of waveform input devices a driver supports.

WIDM_GETPOS

Requests the current input recording position.

WIDM_OPEN

Opens and allocates a waveform input device.

WIDM_RESET

Stops waveform input and returns all data buffers to the client application.

WIDM_START

Begins waveform input.

WIDM_STOP

Ends waveform input.

The widMessage entry-point function for waveform input drivers can optionally support the following messages, depending on whether the driver requires any special preparation to client data buffers.

Optional Messages for Waveform Input Device Drivers

WIDM_PREPARE

Requests that the driver prepare a data buffer for input.

WIDM_UNPREPARE

Requests that a driver clean up the preparation previously done on a data buffer.

In addition to receiving messages, drivers must notify clients when certain events occur. Waveform input drivers notify clients by sending one of the following messages using the DriverCallback function.

Client Notification Messages for Waveform Input Drivers

WIM_CLOSE

Notifies a client application when a device is closed.

WIM_DATA

Notifies a client application when the driver is finished with a data buffer and is returning it to the client.

WIM_OPEN

Notifies a client application when a device is opened.