DirectX SDK |
This topic pertains only to application development in C and C++. See DirectSound Visual Basic Samples.
This sample shows how to use the voice allocation and voice management flags when playing a DirectSound buffer.
Source: (SDK root)\Samples\Multimedia\DSound\Src\VoiceManagement
Executable: (SDK root)\Samples\Multimedia\DSound\Bin\VoiceManagement.exe
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.
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.