Copyright © 2011-2016 MultiMedia Soft

Effects.DirectXApply method (Distortion)

Return to chapter overview

Remarks

 

Applies a Distortion effect to the given portion of sound under editing. This method is not available for COM interoperability: in alternative you can use the Effects.DirectXApplyDistortion 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.

 

 

Syntax

 

[Visual Basic]

Public Function DirectXApply (

nStartPosition as Int32,

nEndPosition as Int32,

fx as Microsoft.DirectX.DirectSound.EffectsDistortion

) as enumErrorCodes


 

[C#]

public enumErrorCodes DirectXApply (

Int32 nStartPosition,

Int32 nEndPosition,

Microsoft.DirectX.DirectSound.EffectsDistortion fx

);


 

[C++]

public: enumErrorCodes DirectXApply (

Int32 nStartPosition,

Int32 nEndPosition,

Microsoft::DirectX::DirectSound::EffectsDistortion fx

);


 

 

Parameter

Description

 

 

nStartPosition

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

nEndPosition

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.

fx

Effect structure containing parameters to apply.

Property

Meaning

 

 

Edge

Retrieves and sets the percentage of distortion intensity, in the EffectsDistortion structure.

Can range from DistortionEffect.EdgeMin to DistortionEffect.EdgeMax.

The default value is 15.

Gain

Retrieves and sets the amount of signal change after distortion, in the EffectsDistortion structure.

Can range from DistortionEffect.GainMin to DistortionEffect.GainMax.

The default value is -18 dB.

PostEqBandwidth

Retrieves and sets the width of frequency band that determines range of harmonic content addition, in the EffectsDistortion structure.

Can range from DistortionEffect.PostEqBandwidthMin to DistortionEffect.PostEqBandwidthMax.

The default value is 2400Hz.

PostEqCenterFrequency

Retrieves and sets the center frequency of harmonic content addition, in the EffectsDistortion structure.

Can range from DistortionEffect.PostEqCenterFrequencyMin to DistortionEffect.PostEqCenterFrequency.

The default value is 2400 Hz.

PreLowpassCutoff

Retrieves and sets the filter cutoff for high-frequency harmonics attenuation, in the EffectsDistortion structure.

Can range from DistortionEffect.PreLowpassCutoffMin to DistortionEffect.PreLowpassCutoffMax.

The default value is 15.

 

 

 

Return value

 

Value

Meaning

 

 

Negative value

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

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.