DSDM_SETFREQUENCY

This message sets the frequency at which the audio samples are to be played. This call does not affect the format of the buffer.

typedef struct {
  DWORD dwMsg;
  DWORD dwInstance;
  DWORD dwFreq;
} DSDMP_SETFREQUENCY;

Members

  • dwMsg
    Equals DSDM_SETFREQUENCY.
  • dwInstance
    DirectSoundBuffer instance data.
  • dwFreq
    The frequency in samples per second at which the samples are to be played. This value must be between 100 and 100,000.

Return Values

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

Error value Description
DSERR_INVALIDCALL This call is not valid for the current state of this object.
DSERR_INVALIDPARAM An invalid parameter was passed to the returning function.

Remarks

If the sound device cannot support frequency control, the driver should fail DSDM_CREATEBUFFER whenever the DSBCAPS_CTRLFREQUENCY flag is specified. Regardless of whether the driver supports frequency control, this function should always return DS_OK if the requested frequency is the same as the current frequency.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Dsdriver.h.

See Also

DirectSound Driver Messages

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.