Microsoft DirectX 8.1 (Visual Basic)

Using Effects in DirectSound

Playback effects in a pure DirectSound application are handled in fundamentally the same way as in an application that uses the DirectMusic performance and audiopaths. For more information, see Using Effects. Because there are no audiopaths in a DirectSound application, you always work directly with buffers.

Effects might not work smoothly on very small buffers.DirectSound does not permit the creation of effects-capable buffers that hold less than 150 milliseconds of data.

Create a secondary buffer that is capable of holding a DMO by setting the DSBCAPS_CTRLFX flag in the DSBUFFERDESC type.

Implement effects on your secondary sound buffers by using DirectSoundSecondaryBuffer8.SetFX.

Obtain objects for effects by using DirectSoundSecondaryBuffer8.GetObjectInPath. Note that this method, unlike DirectMusicAudioPath8.GetObjectInPath, does not take an lStage parameter, because DMOs are the only objects that can be retrieved from buffers.