DirectX SDK

PlaySound Sample

[C++]

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

[Visual Basic]

Description

The PlaySound sample demonstrates the basics of playing a DirectSound buffer.

Path

Source: (SDK root)\Samples\Multimedia\VBSamples\DSound\Src\PlaySound

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

User's Guide

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.

Programming Notes

The sample shows how to create a sound buffer from a file, play the buffer, and change parameters.