Microsoft DirectX 9.0 |
The CreateCaptureBuffer method creates a buffer for capturing waveform audio.
Syntax
HRESULT CreateCaptureBuffer(
LPCDSCBUFFERDESC pcDSCBufferDesc,
LPDIRECTSOUNDCAPTUREBUFFER * ppDSCBuffer,
LPUNKNOWN pUnkOuter
);
Parameters
pcDSCBufferDesc
Pointer to a DSCBUFFERDESC structure containing values for the capture buffer being created.
ppDSCBuffer
Address of a variable that receives an IDirectSoundCaptureBuffer interface pointer. Use QueryInterface to obtain IDirectSoundCaptureBuffer8. See Remarks.
pUnkOuter
Address of the controlling object's IUnknown interface for COM aggregation. Must be NULL.
Return Values
If the method succeeds, the return value is DS_OK.
If the method fails, the return value may be one of the following error values.
Return code |
DSERR_INVALIDPARAM |
DSERR_BADFORMAT |
DSERR_GENERIC |
DSERR_NODRIVER |
DSERR_OUTOFMEMORY |
DSERR_UNINITIALIZED |
Remarks
On Microsoft Windows 98 and Windows 2000, each capture device supports a single buffer.
The IDirectSoundCaptureBuffer8 interface is supported only on buffers created by an object of class CLSID_DirectSoundCapture8. If the IDirectSoundCapture8 interface was obtained from DirectSoundCaptureCreate8, IDirectSoundCaptureBuffer8 is supported. If IDirectSoundCapture8 was obtained from the earlier DirectSoundCaptureCreate function, only IDirectSoundCaptureBuffer is supported.
Requirements
Header: Declared in dsound.h.
See Also