FlangerEffect Class (Microsoft.DirectX.DirectSound)

How Do I...?

  • Add Effects to a SecondaryBuffer Object

Represents a Microsoft DirectSound effects object used to set and retrieve effect parameters on a SecondaryBuffer object that supports flange.

Definition

Visual Basic Public Class FlangerEffect
    Inherits MarshalByRefObjectLeave Site
    Implements IDisposableLeave Site
C# public class FlangerEffect : MarshalByRefObjectLeave Site, IDisposableLeave Site
C++ public ref class FlangerEffect : MarshalByRefObjectLeave Site, IDisposableLeave Site
JScript public class FlangerEffect extends MarshalByRefObjectLeave Site implements IDisposableLeave Site

Members Table

The following table lists the members exposed by the object.

Events

Event Description
Disposing Occurs when the Dispose method is called or when the FlangerEffect object is finalized and collected by the garbage collector of the Microsoft .NET common language runtime.

Fields

Field Description
static (Shared in Visual Basic) DelayMax Retrieves the maximum value for the EffectsFlanger.Delay property.
static (Shared in Visual Basic) DelayMin Retrieves the minimum value for the EffectsFlanger.Delay property.
static (Shared in Visual Basic) DepthMax Retrieves the maximum value for the EffectsFlanger.Depth property.
static (Shared in Visual Basic) DepthMin Retrieves the minimum value for the EffectsFlanger.Depth property.
static (Shared in Visual Basic) FeedbackMax Retrieves the maximum value for the EffectsFlanger.Feedback property.
static (Shared in Visual Basic) FeedbackMin Retrieves the minimum value for the EffectsFlanger.Feedback property.
static (Shared in Visual Basic) FrequencyMax Retrieves the maximum value for the EffectsFlanger.Frequency property.
static (Shared in Visual Basic) FrequencyMin Retrieves the minimum value for the EffectsFlanger.Frequency property.
static (Shared in Visual Basic) Phase180 Retrieves the value of 180 degrees of phase differential for the EffectsFlanger.Phase property.
static (Shared in Visual Basic) Phase90 Retrieves the value of 90 degrees of phase differential for the EffectsFlanger.Phase property.
static (Shared in Visual Basic) PhaseMax Retrieves the maximum value for the EffectsFlanger.Phase property.
static (Shared in Visual Basic) PhaseMin Retrieves the minimum value for the EffectsFlanger.Phase property.
static (Shared in Visual Basic) PhaseNeg180 Retrieves the value of negative 180 degrees of phase differential for the EffectsFlanger.Phase property.
static (Shared in Visual Basic) PhaseNeg90 Retrieves the value of negative 90 degrees of phase differential for the EffectsFlanger.Phase property.
static (Shared in Visual Basic) PhaseZero Retrieves the value of zero degrees of phase differential for the EffectsFlanger.Phase property.
static (Shared in Visual Basic) WaveSin Retrieves the value for a sine waveform for the EffectsFlanger.Waveform property.
static (Shared in Visual Basic) WaveTriangle Retrieves the value for a triangle waveform for the EffectsFlanger.Waveform property.
static (Shared in Visual Basic) WetDryMixMax Retrieves the maximum value for the EffectsFlanger.WetDryMix property.
static (Shared in Visual Basic) WetDryMixMin Retrieves the minimum value for the EffectsFlanger.WetDryMix property.

Methods

Method Description
Dispose Immediately releases the unmanaged resources used by the FlangerEffect object.
Equals Returns a value that indicates whether the current instance is equal to a specified object.
Finalize Allows the FlangerEffect object to free resources before it is destroyed by the garbage collector.
FlangerEffect Initializes a new instance of the FlangerEffect class. This method supports the .NET Framework Infrastructure and is not intended to be used directly in your code.
GetHashCode Returns the hash code for the current instance.
GetObjectByValue This member supports the infrastructure for Microsoft DirectX 9.0 for Managed Code and is not intended to be used directly from your code.
static (Shared in Visual Basic) op_Equality Compares the current instance of a class to another instance to determine whether they are the same.
static (Shared in Visual Basic) op_Inequality Compares the current instance of a class to another instance to determine whether they are different.
raise_Disposing Raises the FlangerEffect.Disposing event when called from within a derived class.

Properties

Property Description
AllParameters Retrieves or sets flanger parameters of a SecondaryBuffer object.
Disposed Gets a value that indicates whether the object is disposed.

Inheritance Hierarchy

ObjectLeave Site

MarshalByRefObjectLeave Site

FlangerEffect

Remarks

Obtain this object by calling the GetEffects or GetObjectInPath method of a SecondaryBuffer object that is using the effect.

How Do I...?

Add Effects to a SecondaryBuffer Object

This C# example demonstrates how to add effect objects to a SecondaryBuffer object.

              [C#]
              
//Create and setup the sound device.
Device dev = new Device();
dev.SetCooperativeLevel(this,CooperativeLevel.Normal);

//Create and setup the buffer description.
BufferDescription buffer_desc = new BufferDescription();
buffer_desc.ControlEffects = true; //this has to be true to use effects.
buffer_desc.GlobalFocus = true; //play sound even if application loses focus.

//Create and setup the buffer for playing the sound.
SecondaryBuffer buffer = new SecondaryBuffer(
    @"C:\WINDOWS\Media\ding.wav", 
    buffer_desc, 
    dev);

//Create an array of effects descriptions, 
//set the effect objects to echo and chorus and 
//set it in the buffer.
EffectDescription[] effects = new EffectDescription[2];
effects[0].GuidEffectClass = DSoundHelper.StandardEchoGuid;
effects[1].GuidEffectClass = DSoundHelper.StandardChorusGuid;
buffer.SetEffects(effects);

//Play Buffer.
buffer.Play(0,BufferPlayFlags.Default);

Class Information

Namespace Microsoft.DirectX.DirectSound
Assembly Microsoft.DirectX.DirectSound (microsoft.directx.directsound.dll)
Strong Name Microsoft.DirectX.DirectSound,  Version=1.0.900.0,  Culture=neutral,  PublicKeyToken=d3231b57b74a1492