Platform SDK: DirectX |
This topic pertains only to application development in Visual Basic. See DirectSound C/C++ Samples.
The Capture application shows how to capture sound from the wave input device, typically a sound card with a microphone attached.
Source: (SDK root)\Samples\Multimedia\VBSamples\DSound\Src\Capture
Executable: (SDK root)\Samples\Multimedia\VBSamples\DSound\Bin\Capture.exe
Click Record and capture up to 20 seconds of sound, then click Stop. You can play back the buffer and save it to a wave file.
In order to save the sound data, the program must copy it to an output buffer so that the DirectSoundBuffer.SaveToFile method can be used.