Capture Overview

The DirectSoundCapture object is used to query the capabilities of sound capture devices and to create buffers for capturing audio from an input source.

Audio capture functions already exist in Win32. The first release of DirectSoundCapture in the DirectX 5 Programmer's Reference does not provide any performance improvement over the existing waveIn functions. However, the DirectSoundCapture API allows application developers to create titles using consistent interfaces for both audio playback and capture. It also allows titles to be developed today that will benefit from new, improved driver models and API implementations in the future.

DirectSoundCapture allows capturing of compressed formats. In this first version, the underlying waveIn functions or the hardware provide support for compressed formats. DirectSoundCapture does not call the audio compression manager (ACM) functions itself.

The DirectSoundCaptureBuffer object represents a buffer used for capturing data from the input device. This buffer is circular; that is, when the input pointer reaches the end of the buffer, it starts again at the beginning.

The methods of the DirectSoundCaptureBuffer object allow you to retrieve the properties of the buffer, start and stop audio capture, and lock portions of the memory so that you can safely retrieve data for saving to a file or for some other purpose.

As with playback, DirectSound allows you to request notification when captured data reaches a specified position within the buffer, or when capture has stopped. This service is provided through the IDirectSoundNotify interface.