DirectX SDK

VoiceManagement Sample

[Visual Basic]

This topic pertains only to application development in C and C++. See DirectSound Visual Basic Samples.

[C++]

Description

This sample shows how to use the voice allocation and voice management flags when playing a DirectSound buffer.

Path

Source: (SDK root)\Samples\Multimedia\DSound\Src\VoiceManagement

Executable: (SDK root)\Samples\Multimedia\DSound\Bin\VoiceManagement.exe

User's Guide

Click the Sound File button to load a wave file. Select voice management options. (The selected options are explained in the Expected Behavior frame.) Select Loop if you want to play the sound repeatedly. Click Play to begin playing the sound.

Programming Notes

The buffer must be created using the DSBCAPS_LOCDEFER flag. Otherwise DirectSound will not be able to dynamically place the buffer in either hardware or software at run time.