Microsoft DirectX 8.1 (C++)

SoundFX

Description

The SoundFX sample shows how to use DMOs with DirectSound and how to manipulate effect parameters. It is similar to the AudioFX sample but does not use an audiopath or any of the DirectMusic interfaces.

Path

Source: (SDK root)\Samples\Multimedia\DirectSound\SoundFX

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

User's Guide

A default sound file is loaded when the application is run. If you wish, load a different one by clicking Open File.

At first, no effects are enabled. Click Play to hear the sound without effects.

Click Stop to stop the buffer. Apply one or more effects by selecting checkboxes in the Enable column. Play the sound again.

To adjust parameters for an effect, select an option button in the Adjust column and change the values in the frame on the right side of the window. This can be done regardless of whether the sound is playing and regardless of whether the effect has been applied yet.

Programming Notes

The application implements a CSoundFXManager class to manage effects. An IDirectSoundBuffer8 interface is used to set effects on the buffer in the CSoundFXManager::ActivateFX method. Effect parameters are set in the OnEffectChanged function in response to messages from the interface.

See Also