WODM_SETPLAYBACKRATE

The WODM_SETPLAYBACKRATE message requests a waveform output driver to set the playback rate multiplier value for the specified device.

Parameters
uDeviceId
Device identifier (0, 1, 2, and so on) for the target device.
uMsg
WODM_SETPLAYBACKRATE
dwUser
Device instance identifier.
dwParam1
A DWORD containing the playback rate multiplier value. This is specified as a fixed-point value, where the high-order word of the DWORD contains the signed integer part of the number, and the low-order word contains the fractional part. The fraction consists of a WORD value, for which 0x8000 represents one half, and 0x4000 represents one quarter. For example, the value 0x00010000 specifies a multiplier of 1.0 (no rate change), and a value of 0x000F8000 specifies a multiplier of 15.5.
dwParam2
Not used.
Return Value

The driver should return MMSYSERR_NOERROR if the operation succeeds. Otherwise it should return one of the MMSYSERR or WAVERR error codes defined in mmsystem.h. See waveOutSetPlaybackRate return values in the Win32 SDK.

Comments

A client sends the WODM_SETPLAYBACKRATE message by calling the user-mode driver’s wodMessage entry point, passing the specified parameters.

Support for the WODM_SETPLAYBACKRATE message by user-mode drivers is optional. If a driver supports the WODM_SETPLAYBACKRATE message, it must also support WODM_GETPLAYBACKRATE.  Additionally, in response to a WODM_GETDEVCAPS message, it must set WAVECAPS_PLAYBACKRATE in the dwSupport member of the WAVEOUTCAPS structure.

Typically, the user-mode driver calls DeviceIoControl to send the kernel-mode driver an IOCTL_WAVE_SET_PLAYBACK_RATE control code. Kernel-mode drivers can implement playback rate changes by skipping or repeating samples. For example, if the playback rate is 2.0, the driver would play every second sample at the original playback rate.

Note:  The kernel-mode driver library, soundlib.lib, does not support playback rate changes.