DSCBUFFERDESC Structure

[The feature associated with this page, DirectSound, is a legacy feature. It has been superseded by WASAPI and Audio Graphs. Media Casting have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Media Casting instead of DirectSound, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The DSCBUFFERDESC structure describes a capture buffer. It is used by the IDirectSoundCapture8::CreateCaptureBuffer method and by the DirectSoundFullDuplexCreate8 function.

An earlier version of this structure, DSCBUFFERDESC1, is maintained in Dsound.h for compatibility with DirectX 7 and earlier.

Syntax

typedef struct DSCBUFFERDESC {
    DWORD dwSize;
    DWORD dwFlags;
    DWORD dwBufferBytes;
    DWORD dwReserved;
    LPWAVEFORMATEX lpwfxFormat;
    DWORD dwFXCount;
    LPDSCEFFECTDESC lpDSCFXDesc;
} DSCBUFFERDESC;

Members

  • dwSize
    Size of the structure, in bytes. This member must be initialized before the structure is used.

  • dwFlags
    Specifies device capabilities. Can be zero, or one or more of the flags shown in the following table.

    Value Description
    DSCBCAPS_CTRLFX The buffer supports effects. See Remarks.
    DSCBCAPS_WAVEMAPPED The Win32 wave mapper will be used for formats not supported by the device.
  • dwBufferBytes
    Size of capture buffer to create, in bytes.

  • dwReserved
    Reserved for future use.

  • lpwfxFormat
    Pointer to a WAVEFORMATEX structure containing the format in which to capture the data.

  • dwFXCount
    Number of elements in the array pointed to by lpDSCFXDesc. Must be zero unless DSCBCAPS_CTRLFX is present in dwFlags.

  • lpDSCFXDesc
    Address of an array of DSCEFFECTDESC structures that describe effects supported by hardware for the buffer. User-mode DMOs are not supported.

Remarks

The DSCBCAPS_CTRLFX flag is supported only on buffers created by an object of class CLSID_DirectSoundCapture8. If the IDirectSoundCapture8 interface was obtained from the DirectSoundCaptureCreate8 function, this flag is supported; if it was obtained from the earlier DirectSoundCaptureCreate function, it is not supported.

Capture effects require Microsoft Windows XP.

Requirements

Header: Declared in DSound.h.