SoundWaveDispatch

NTSTATUS
SoundWaveDispatch(
IN OUT PLOCAL_DEVICE_INFO
pLDI,
IN PIRP
pIrp,
IN PIO_STACK_LOCATION
IrpStack
);

The SoundWaveDispatch function is the IRP control code dispatcher for waveform devices.

Parameters

pLDI

Pointer to a LOCAL_DEVICE_INFO structure.

pIrp

Pointer to an IRP structure.

IrpStack

Pointer to an IO_STACK_LOCATION structure.

Return Value

Returns STATUS_SUCCESS if the operation succeeds. Otherwise returns an NTSTATUS error code.

Comments

Kernel-mode waveform device drivers using soundlib.lib place the address of the SoundWaveDispatch function in the DispatchRoutine member of a SOUND_DEVICE_INIT structure. The function is called by soundlib.lib's main dispatcher, SoundDispatch.

The function processes the following IRP control codes:

IRP_MJ_CLEANUP
IRP_MJ_CLOSE
IRP_MJ_CREATE
IRP_MJ_DEVICE_CONTROL
IRP_MJ_READ
IRP_MJ_WRITE

For IRP_MJ_DEVICE_CONTROL, the function processes the following I/O control codes:

IOCTL_SOUND_GET_CHANGED_VOLUME
IOCTL_WAVE_GET_CAPABILITIES
IOCTL_WAVE_GET_PITCH
IOCTL_WAVE_GET_PLAYBACK_RATE
IOCTL_WAVE_GET_POSITION
IOCTL_WAVE_GET_POSITION
IOCTL_WAVE_GET_STATE
IOCTL_WAVE_GET_VOLUME
IOCTL_WAVE_QUERY_FORMAT
IOCTL_WAVE_SET_FORMAT
IOCTL_WAVE_SET_LOW_PRIORITY
IOCTL_WAVE_SET_PITCH
IOCTL_WAVE_SET_PLAYBACK_RATE
IOCTL_WAVE_SET_STATE