|Microsoft DirectX 9.0|
The SetFrequency method sets the frequency at which the audio samples are played.
HRESULT SetFrequency( DWORD dwFrequency );
Frequency, in hertz (Hz), at which to play the audio samples. A value of DSBFREQUENCY_ORIGINAL resets the frequency to the default value of the buffer format.
If the method succeeds, the return value is DS_OK.
If the method fails, the return value may be one of the following error values:
Increasing or decreasing the frequency changes the perceived pitch of the audio data. This method does not affect the format of the buffer.
Before setting the frequency, you should ascertain whether the frequency is supported by checking the dwMinSecondarySampleRate and dwMaxSecondarySampleRate members of the DSCAPS structure for the device. Some operating systems do not support frequencies greater than 100,000 Hz.
This method is not valid for the
Header: Declared in dsound.h.