IDirectSoundCaptureBuffer8
[The feature associated with this page, DirectSound, is a legacy feature. It has been superseded by WASAPI and Audio Graphs. Media Casting have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Media Casting instead of DirectSound, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The IDirectSoundCaptureBuffer8 interface is used to manipulate sound capture buffers.
To obtain the IDirectSoundCaptureBuffer8 interface, call the IDirectSoundCapture8::CreateCaptureBuffer method to obtain IDirectSoundCaptureBuffer, then pass IID_IDirectSoundCaptureBuffer8 to IDirectSoundCaptureBuffer::QueryInterface.
In addition to the methods inherited from IUnknown, the IDirectSoundCaptureBuffer8 interface exposes the following methods, arranged by category.
Capture Management
Method | Description |
---|---|
IDirectSoundCaptureBuffer8::Lock | The Lock method locks a portion of the buffer. Locking the buffer returns pointers into the buffer, allowing the application to read or write audio data into memory. |
IDirectSoundCaptureBuffer8::Start | The Start method begins capturing data into the buffer. If the buffer is already capturing, the method has no effect. |
IDirectSoundCaptureBuffer8::Stop | The Stop method stops the buffer so that it is no longer capturing data. If the buffer is not capturing, the method has no effect. |
IDirectSoundCaptureBuffer8::Unlock | The Unlock method unlocks the buffer. |
Effects
Method | Description |
---|---|
IDirectSoundCaptureBuffer8::GetFXStatus | The GetFXStatus method retrieves the status of capture effects. |
IDirectSoundCaptureBuffer8::GetObjectInPath | The GetObjectInPath method retrieves an interface to an effect object associated with the buffer. |
Initialization
Method | Description |
---|---|
IDirectSoundCaptureBuffer8::Initialize | The Initialize method initializes a capture buffer object. Because the IDirectSoundCapture8::CreateCaptureBufferIDirectSoundCapture8::CreateCaptureBuffer |
Information
Method | Description |
---|---|
IDirectSoundCaptureBuffer8::GetCaps | The GetCaps method retrieves the capabilities of the buffer. |
IDirectSoundCaptureBuffer8::GetCurrentPosition | Address of a variable that receives the offset from the start of the buffer, in bytes, of the capture cursor. The parameter can be NULL if this value is not wanted. |
IDirectSoundCaptureBuffer8::GetFormat | The GetFormat method retrieves the waveform format of the capture buffer. |
IDirectSoundCaptureBuffer8::GetStatus | The GetStatus method retrieves the status of the capture buffer. |
The LPDIRECTSOUNDCaptureBuffer8 type is defined as a pointer to the IDirectSoundCaptureBuffer8 interface:
typedef struct IDirectSoundCaptureBuffer8 *LPDIRECTSOUNDCaptureBuffer8;
Requirements
Header: Declared in DSound.h.
Library: Use Dsound3d.dll.