IDirectSoundBuffer::GetFrequency

HRESULT GetFrequency(LPDWORD lpdwFrequency);

Retrieves the frequency, in samples per second, at which the buffer is being played. This value will be in the range of 100-100,000.

·Returns DS_OK if successful, or one of the following error values otherwise:

DSERR_CONTROLUNAVAIL DSERR_INVALIDPARAM
DSERR_PRIOLEVELNEEDED  

lpdwFrequency

Address of the variable that represents the frequency at which the audio buffer is being played.