Microsoft DirectX 9.0

Voice Management Sample


The Voice Management sample shows how to implement dynamic voice management when creating DirectSound secondary buffers.


Source: (SDK root)\Samples\C++\DirectSound\VoiceManagement

Executable: (SDK root)\Samples\C++\DirectSound\Bin

User's Guide

Load a WAV file by clicking Sound File. Select the Voice Allocation Flags, Buffer Priority, and Voice Management Flags options. Note that the effect of the selected options is described under Expected Behavior. Create the buffer and play the sound by clicking Play.

Programming Notes

To use voice management flags, the buffer must be created using DSBCAPS_LOCDEFER. Otherwise DirectSound will not be able to dynamically place the buffer in either hardware or software at run time.

When playing the buffer, call IDirectSoundBuffer8::Play with a valid combination of voice management flags. Run the sample to observe the result of any combination of flags.

See Also