DirectX SDK

PlaySound 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 play a wave file using a static DirectSoundBuffer.

Path

Source: Mssdk\Samples\Multimedia\DSound\Src\PlaySound

Executable: Mssdk\Samples\Multimedia\DSound\Bin\PlaySound.exe

User's Guide

Click the Sound File button to load a wave file, and click Play to play the sound. Select Loop in order to play the sound repeatedly.

Programming Notes

Compare the PlayStreaming Sample, which uses streaming buffers.