EffectDescription Structure (Microsoft.DirectX.DirectSound)
How Do I...?
- Add Effects to a SecondaryBuffer Object
Contains properties that describe an effect associated with a buffer.
Definition
Visual Basic Public Structure EffectDescription C# public struct EffectDescription C++ public value class EffectDescription sealed JScript In JScript, you can use structures, but you cannot define your own.
Members Table
The following table lists the members exposed by the object.
Methods
Method Description EffectDescription Initializes a new instance of the EffectDescription structure. ToString Obtains a string representation of the current instance. Properties
Property Description GuidEffectClass Retrieves and sets the class identifier of the effect. LocateInHardware Retrieves or sets whether the effect must be in hardware. LocateInSoftware Retrieves or sets whether the effect must be in software.
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);
Structure 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
See Also