Copyright © 2011-2018 MultiMedia Soft

Effects.DirectXApply method (Flanger)

Return to chapter overview



Applies a Flanger effect to the given portion of sound under editing. This method is not available for COM interoperability: in alternative you can use the Effects.DirectXApplyFlanger method.


DirectX effects requires the availability of DirectX version 8 or higher on the target system and can be applied only if a call to the GetDirectSoundVersion method returns a value higher than 7.


For further details about methods related to the use of special effects refer to the EffectsMan class.





[Visual Basic]

Public Function DirectXApply (

nStartPosition as Int32,

nEndPosition as Int32,

fx as Microsoft.DirectX.DirectSound.EffectsFlanger

) as enumErrorCodes



public enumErrorCodes DirectXApply (

Int32 nStartPosition,

Int32 nEndPosition,

Microsoft.DirectX.DirectSound.EffectsFlanger fx




public: enumErrorCodes DirectXApply (

Int32 nStartPosition,

Int32 nEndPosition,

Microsoft::DirectX::DirectSound::EffectsFlanger fx









Start position, expressed in milliseconds, of the affected sound range.


End position, expressed in milliseconds, of the affected sound range.. If set to -1 the end position will be set to the end of the sound.


Effect structure containing parameters to apply.






Retrieves and sets the number of milliseconds the input is delayed before it is played back.

Can range from FlangerEffect.DelayMin to FlangerEffect.DelayMax.

The default value is 2ms.


Retrieves and sets the percentage by which the delay time is modulated by the low-frequency oscillator (LFO), in hundredths of a percentage point.

Can range from FlangerEffect.DepthMin to FlangerEffect.DepthMax.

The default value is 100.


Retrieves and sets the percentage of output signal to feed back into the effect's input.

Can range from FlangerEffect.FeedbackMin to FlangerEffect.FeedbackMax.

The default value is -50.


Retrieves and sets the frequency of the LFO.

Can range from FlangerEffect.FrequencyMin to FlangerEffect.FrequencyMax.

The default value is 0.


Retrieves and sets the phase differential between left and right LFOs.

Can be set to on of the following:

- FlangerEffect.PhaseNeg180

- FlangerEffect.PhaseNeg90

- FlangerEffect.PhaseZero

- FlangerEffect.Phase90

- FlangerEffect.Phase180


Retrieves and sets the waveform shape of the LFO.

Can be set to on of the following:

- FlangerEffect.WaveSine (default)

- FlangerEffect.WaveTriangle


Retrieves and sets the ratio of wet (processed) signal to dry (unprocessed) signal.

Can range from FlangerEffect.WetDryMixMin to FlangerEffect.WetDryMixMax.

The default value is 50.



Return value






Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.