共用方式為


IDirectSoundCapture8

[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 IDirectSoundCapture8 interface is used to create sound capture buffers.

The interface is obtained by using the DirectSoundCaptureCreate8 or DirectSoundFullDuplexCreate8 functions, or by using CoCreateInstance or CoCreateInstanceEx to create an object of class CLSID_DirectSoundCapture8.

IDirectSoundCapture8 is a define for IDirectSoundCapture. The two interface names are interchangeable. However, objects supporting this interface can have different functionality, depending on their class. For more information, see DirectSoundCaptureCreate8 and IDirectSoundCapture8::CreateCaptureBuffer.

In addition to the methods inherited from IUnknown, the IDirectSoundCapture8 interface exposes the following methods.

IDirectSoundCapture8 Members

Method Description
IDirectSoundCapture8::CreateCaptureBuffer The CreateCaptureBuffer method creates a buffer for capturing waveform audio.
IDirectSoundCapture8::GetCaps The GetCaps method retrieves the capabilities of the capture device.
IDirectSoundCapture8::Initialize The Initialize method initializes a capture device object created by using CoCreateInstance. Calling this method is not required when the DirectSoundCaptureCreate8 or DirectSoundFullDuplexCreate8 function is used to create the object.

The LPDIRECTSOUNDCAPTURE type is defined as a pointer to the IDirectSoundCapture interface:

typedef struct IDirectSoundCapture *LPDIRECTSOUNDCAPTURE;

Requirements

Header: Declared in DSound.h.

Library: Use Dsound3d.dll.

See Also

DirectSound Interfaces