To set or retrieve parameters of sound effects, you must first obtain the appropriate effect object from the buffer that contains the effect.
Objects of the following classes give you access to parameters of the Microsoft DirectX Media Objects (DMOs) supplied with DirectX.
- ChorusEffect class
- CompressorEffect class
- DistortionEffect class
- EchoEffect class
- FlangerEffect class
- GargleEffect class
- Interactive3DLevel2ReverbEffect class
- ParamEqEffect class
- WavesReverbEffect class
[Visual Basic]Dim echoFx As EchoEffect Dim echoParams As EffectsEcho echoFx = fxBuffer.GetEffects(0) echoParams = echoFx.AllParameters echoParams.LeftDelay = 500 echoParams.RightDelay = 500 echoFx.AllParameters = echoParams
Effect parameters can be changed while the buffer is playing.
For efficiency, Microsoft DirectSound preprocesses 100 milliseconds of sound data in a buffer, starting at the play cursor, before SecondaryBuffer.Play is called. This can happen after any of the following calls.
If you call any of these methods and then change effect parameters, the new parameters will not be heard until the preprocessed data has been played. To avoid this situation, do one of the following: