Microsoft DirectX 8.1 (Visual Basic)

EffectsBuffers

Description

The EffectsBuffers sample demonstrates the use of effects on DirectSound secondary buffers, and enables modification of effect parameters.

Path

Source: (SDK root)\Samples\Multimedia\VBSamples\DirectSound\EffectsBuffers

Executable: (SDK root)\Samples\Multimedia\VBSamples\DirectSound\Bin

User's Guide

Load a wave file by clicking the button beside the top text box. Select an effect in the top list and move it to the bottom list by clicking the down arrow, or by double-clicking the effect. Remove an effect by selecting it in the bottom list and clicking on the up arrow, or by double-clicking the effect, or by right-clicking the effect and choosing Remove from the popup menu. Update the effects on the buffer by clicking Apply Effects. Note that the status of each effect is given in the Effects in Use list. Play the sound.

You can modify the parameters for an effect when the sound is not playing. Select the effect in the Effects In Use list and click Modify Effect, or right-click the effect and choose Change Settings from the popup menu.

Programming Notes

The ApplySettings function keeps track of what effects have already been applied by creating a unique value for each combination of effects. When the user clicks Apply Effects, the current combination is compared with the last one, stored in mlEffectKey, to see whether the effects have to be updated.