Microsoft DirectX 9.0 SDK Update (October 2004)

EffectDescription.GuidEffectClass Property

Language:

Note: This documentation is preliminary and is subject to change.
How Do I...?

Retrieves and sets the class identifier of the effect.

Definition

Visual Basic .NET Public Property GuidEffectClass As Guid
C# public Guid GuidEffectClass { get; set; }
Managed C++ public: __property Guid get_GuidEffectClass();
public: __property void set_GuidEffectClass(Guid);
JScript .NET public function get GuidEffectClass() : Guid
public function set GuidEffectClass(Guid);

Property Value

System.Guid . The class identifier of the effect.

This property is read/write. 

Remarks

When setting effects to a sound buffer, use the DSoundHelper class to get the globally unique identifier (GUID) for this property.

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);


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center