The CreateCaptureBuffer method creates a buffer for capturing waveform audio.
HRESULT CreateCaptureBuffer( LPCDSCBUFFERDESC pcDSCBufferDesc, LPDIRECTSOUNDCAPTUREBUFFER * ppDSCBuffer, LPUNKNOWN pUnkOuter );
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 |
On Microsoft Windows98 and Windows2000, 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.
Header: Declared in Dsound.h.
Import Library: Use Dsound3d.dll.