Microsoft DirectX 8.1 (C++) |
The DirectSoundCaptureCreate8 function creates and initializes an object that supports the IDirectSoundCapture8 interface.
This function creates an object that supports capture effects. Although the older DirectSoundCaptureCreate function can also be used to obtain the IDirectSoundCapture8 interface, the object created by that function cannot be used to create capture buffers that support the IDirectSoundCaptureBuffer8 interface.
Syntax
HRESULT WINAPI DirectSoundCaptureCreate8(
LPCGUID lpcGUID,
LPDIRECTSOUNDCAPTURE8 *lplpDSC,
LPUNKNOWN pUnkOuter
);
Parameters
lpcGUID
Address of the GUID that identifies the sound capture device. The value of this parameter must be one of the GUIDs returned by DirectSoundCaptureEnumerate, or NULL for the default device, or one of the following values.
Value | Description |
DSDEVID_DefaultCapture | System-wide default audio capture device. |
DSDEVID_DefaultVoiceCapture | Default voice capture device. |
lplpDSC
Address of a variable to receive an IDirectSoundCapture8 interface pointer.
pUnkOuter
Address of the controlling object's IUnknown interface for COM aggregation. Must be NULL, because aggregation is not supported.
Return Values
If the function succeeds, it returns DS_OK. If it fails, the return value may be one of the following values.
Return code |
DSERR_ALLOCATED |
DSERR_INVALIDPARAM |
DSERR_NOAGGREGATION |
DSERR_OUTOFMEMORY |
Remarks
On sound cards that do not support full duplex, this method will fail and return DSERR_ALLOCATED.
Requirements
Header: Declared in Dsound.h.
Import Library: Use Dsound.lib.