Microsoft DirectX 8.1 (C++) |
The DirectSoundFullDuplexCreate8 function creates the DirectSound and DirectSoundCapture objects and returns the IDirectSoundFullDuplex8 interface. IDirectSoundFullDuplex8 requires Microsoft® Windows® XP Home Edition or Windows XP Professional, but can be used on other operating systems for convenience to set up the other objects necessary for full-duplex operations.
Syntax
HRESULT WINAPI DirectSoundFullDuplexCreate8(
LPCGUID pcGuidCaptureDevice,
LPCGUID pcGuidRenderDevice,
LPCDSCBUFFERDESC pcDSCBufferDesc,
LPCDSBUFFERDESC pcDSBufferDesc,
HWND hWnd,
DWORD dwLevel,
LPDIRECTSOUNDFULLDUPLEX* ppDSFD,
LPDIRECTSOUNDCAPTUREBUFFER8 *ppDSCBuffer8,
LPDIRECTSOUNDBUFFER8 *ppDSBuffer8,
LPUNKNOWN pUnkOuter
);
Parameters
pcGuidCaptureDevice
Address of the GUID that identifies the sound capture device for full duplex input. Must be one of the GUIDs returned by DirectSoundCaptureEnumerate, or NULL for the default capture device, or one of the following values.
Value | Description |
DSDEVID_DefaultCapture | System-wide default audio capture device. |
DSDEVID_DefaultVoiceCapture | Default voice capture device. |
pcGuidRenderDevice
Address of the GUID that identifies the sound render device for full-duplex output. Must be one of the GUIDs returned by DirectSoundEnumerate, or NULL for the default render device, or one of the following values.
Value | Description |
DSDEVID_DefaultPlayback | System-wide default audio playback device. |
DSDEVID_DefaultVoicePlayback | Default voice playback device. |
pcDSCBufferDesc
Address of a DSCBUFFERDESC structure that specifies the characteristics of the capture buffer.
pcDSBufferDesc
Address of a DSBUFFERDESC structure that specifies the characteristics of the render buffer.
hWnd
Handle to the application window.
dwLevel
Cooperative level for the DirectSound object. For more information, see IDirectSound8::SetCooperativeLevel.
ppDSFD
Address of a variable that receives the IDirectSoundFullDuplex8 interface pointer.
ppDSCBuffer8
Address of a variable that receives the IDirectSoundCaptureBuffer8 interface of the capture buffer.
ppDSBuffer8
Address of a variable that receives the IDirectSoundBuffer8 interface of the render buffer.
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.
Return code |
DSERR_ALLOCATED |
DSERR_INVALIDCALL |
DSERR_INVALIDPARAM |
DSERR_NOAGGREGATION |
DSERR_NODRIVER |
DSERR_OUTOFMEMORY |
Requirements
Header: Declared in Dsound.h.
Import Library: Use Dsound.lib.