DirectSound - microsoft/DirectX-SDK-Samples GitHub Wiki
DirectSound Samples
MFC-based DirectSound samples last shipped in November 2007.
To build with Visual Studio you need to install the "C++ v14.29 (16.11) MFC for v142 build tools (x86 & x64)" optional component (or the v143 version if you upgrade the projects in Visual Studio 2022).
Games and new projects should strongly prefer to use XAudio2 instead of legacy DirectSound for playback, and use Windows Core Audio (WASAPI) for audio capture.
AdjustSound (December 2002)
This sample shows how to create a DirectSound secondary buffer to play a WAV file, and how to change the parameters of the buffer.
AmplitudeModulation (December 2002)
This sample shows how to play a wave file in a DirectSound secondary buffer.
CaptureSound (December 2002)
This application shows how to capture waveforms in a file.
EnumDevices (December 2002)
The Enumerate DirectSound Devices sample shows how to enumerate and create playback and capture devices.
FullDuplexFilter (December 2002)
The Full Duplex Filter sample application shows how to capture and play back sounds at the same time.
Play3DSound (December 2002)
The Play 3D Sound sample shows how to create a 3-D sound buffer and manipulate its properties.
PlaySound (December 2002)
This sample shows how to play a wave file in a DirectSound secondary buffer.
SoundFX (December 2002)
The SoundFX sample shows how to use DMOs with DirectSound and how to manipulate effect parameters.
VoiceManagement (December 2002)
This sample shows how to implement dynamic voice management when creating DirectSound secondary buffers.