DSDM_SETFORMAT

This message sets the format of the sound buffer to the format described in the WAVEFORMATEX structure.

typedef struct {
  DWORD dwMsg;
  DWORD dwInstance;
  LPWAVEFORMATEX pWFX;
} DSDMP_SETFORMAT;

Members

  • dwMsg
    Equals DSDM_SETFORMAT.
  • dwInstance
    DirectSoundBuffer instance data.
  • pWFX
    Pointer to a WAVEFORMATEX structure that describes the new format desired for the sound buffer.

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.
DSERR_BADFORMAT The specified format is not supported.

Remarks

DirectSound guarantees that this message is never called when the buffer is playing.

Requirements

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

See Also

WAVEFORMATEX | DirectSound Driver Messages

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.