次の方法で共有


DSEFFECTDESC 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 DSEFFECTDESC structure describes an effect associated with a buffer.

Syntax

typedef struct DSEFFECTDESC {
    DWORD dwSize;
    DWORD dwFlags;
    GUID guidDSFXClass;
    DWORD_PTR dwReserved1;
    DWORD_PTR dwReserved2;
} DSEFFECTDESC;

Members

  • dwSize
    Size of the structure, in bytes.

  • dwFlags
    Flags. Can be zero or one of the following values.

    Value Description
    DSFX_LOCHARDWARE Effect must be in hardware. If the effect is not available in hardware, IDirectSoundBuffer8::SetFX raises an error. Since DirectX 9.0, DirectX does not support hardware acceleration of effects, so this flag should not be used.
    DSFX_LOCSOFTWARE Effect must be in software, even if the hardware supports acceleration of guidDSFXClass. If the effect is not available in software, SetFX raises an error. Since DirectX 9.0, all effects are in software regardless of whether this flag is set.
  • guidDSFXClass
    Class identifier of the effect. The following standard effect classes are defined.

    Value Description
    GUID_DSFX_STANDARD_CHORUS Chorus
    GUID_DSFX_STANDARD_COMPRESSOR Compressor
    GUID_DSFX_STANDARD_DISTORTION Distortion
    GUID_DSFX_STANDARD_ECHO Echo
    GUID_DSFX_STANDARD_FLANGER Flanger
    GUID_DSFX_STANDARD_GARGLE Gargle
    GUID_DSFX_STANDARD_I3DL2REVERB Interactive 3D Level 2 reverb
    GUID_DSFX_STANDARD_PARAMEQ Parametric equalizer
    GUID_DSFX_WAVES_REVERB Waves reverb
  • dwReserved1
    Reserved for future use.

  • dwReserved2
    Reserved for future use.

Remarks

Custom effects can be implemented as DMOs. Effect DMOs must implement the IMediaObject and IMediaObjectInPlace interfaces.

If dwFlags is zero, the effect is placed in hardware if possible. If the hardware does not support the effect (always the case since DirectX 9.0), software is used. If the effect is not available at all, the call to SetFX fails.

Requirements

Header: Declared in DSound.h.

See Also

DSBCAPS
IDirectSoundBuffer8::SetFX
Using Effects