Platform SDK: DirectX |
This topic pertains only to application development in Visual Basic. See DirectSound C/C++ Samples.
The PlaySound sample demonstrates the basics of playing a DirectSound buffer.
Source: (SDK root)\Samples\Multimedia\VBSamples\DSound\Src\PlaySound
Executable: (SDK root)\Samples\Multimedia\VBSamples\DSound\Bin\Vb_PlaySound.exe
Click Sound File and load a wave file. Select Loop Sound if you want to hear the sound continuously, then click Play. You can adjust the frequency, pan, and volume as the sound is playing.
The sample shows how to create a sound buffer from a file, play the buffer, and change parameters.