Microsoft DirectX 8.1 (C++) |
Description
The VoiceManagement sample shows how to implement dynamic voice management when creating DirectSound secondary buffers.
Path
Source: (SDK root)\Samples\Multimedia\DirectSound\VoiceManagement
Executable: (SDK root)\Samples\Multimedia\DirectSound\Bin
User's Guide
Load a wave 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