Windows Multimedia DDK (mddkqh.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
WODM_SETPLAYBACKRATE
◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
WODM_SETPLAYBACKRATE
This message is sent to a waveform output device driver to set
the playback rate for a device.
Parameters
DWORD dwParam1
Specifies the new playback rate setting. The rate is
specified as a fixed-point value. 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 is expressed as a WORD in which a value of 0x8000
represents one-half, and 0x4000 represents one-quarter. For
example, the value 0x00010000 specifies a multiplier of 1.0
(no pitch change), and a value of 0x000F8000 specifies a
multiplier of 15.5.
DWORD dwParam2
Unused.
Return value
The return value is an error code, or zero (MMSYSERR_NOERROR) if
the operation is successful. Possible error codes are:
MMSYSERR_NOTENABLED
The driver failed to load or initialize.
MMSYSERR_NOTSUPPORTED
The driver does not support changes to the playback rate.
Comments
Driver support for playback rate changes is optional. When a
driver receives a WODM_GETDEVCAPS message, it should indicate
support for playback rate changes by setting or clearing the
WAVECAPS_PLAYBACKRATE bit in the dwSupport field of the
WAVEOUTCAPS data structure. If a driver supports the
WODM_SETPLAYBACKRATE message, then it must also support
WODM_GETPLAYBACKRATE.
Changes to the playback rate alter the pitch of a waveform
during playback and are usually implemented by the driver by
skipping or repeating samples. For example, if the playback
rate was 2.0, the driver would play every second sample, at the
original playback rate.
See also
WODM_GETPLAYBACKRATE, WODM_SETPITCH
-♦-