共用方式為


DSFXChorus 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 DSFXChorus structure contains parameters for a chorus effect.

Syntax

typedef struct DSFXChorus {
    FLOAT fWetDryMix;
    FLOAT fDepth;
    FLOAT fFeedback;
    FLOAT fFrequency;
    LONG lWaveform;
    FLOAT fDelay;
    LONG lPhase;
} DSFXChorus;

Members

  • fWetDryMix
    Ratio of wet (processed) signal to dry (unprocessed) signal. Must be in the range from DSFXCHORUS_WETDRYMIX_MIN through DSFXCHORUS_WETDRYMIX_MAX (all wet). The default value is 50.

  • fDepth
    Percentage by which the delay time is modulated by the low-frequency oscillator, in hundredths of a percentage point. Must be in the range from DSFXCHORUS_DEPTH_MIN through DSFXCHORUS_DEPTH_MAX. The default value is 10.

  • fFeedback
    Percentage of output signal to feed back into the effect's input, in the range from DSFXCHORUS_FEEDBACK_MIN to DSFXCHORUS_FEEDBACK_MAX. The default value is 25.

  • fFrequency
    Frequency of the LFO, in the range from DSFXCHORUS_FREQUENCY_MIN to DSFXCHORUS_FREQUENCY_MAX. The default value is 1.1.

  • lWaveform
    Waveform shape of the LFO. Defined values are DSFXCHORUS_WAVE_TRIANGLE and DSFXCHORUS_WAVE_SIN. By default, the waveform is a sine.

  • fDelay
    Number of milliseconds the input is delayed before it is played back, in the range from DSFXCHORUS_DELAY_MIN to DSFXCHORUS_DELAY_MAX. The default value is 16 ms.

  • lPhase
    Phase differential between left and right LFOs, in the range from DSFXCHORUS_PHASE_MIN through DSFXCHORUS_PHASE_MAX. Possible values are defined as follows.

    Value
    DSFXCHORUS_PHASE_NEG_180
    DSFXCHORUS_PHASE_NEG_90
    DSFXCHORUS_PHASE_ZERO
    DSFXCHORUS_PHASE_90
    DSFXCHORUS_PHASE_180

    The default value is DSFXCHORUS_PHASE_90.

Requirements

Header: Declared in DSound.h.

See Also

Chorus
IDirectSoundFXChorus8