Microsoft DirectX 9.0

IDirectSoundFullDuplex8::Initialize

The Initialize method initializes a full duplex object that was created by using CoCreateInstance.

Syntax

HRESULT Initialize(
  LPCGUID  pCaptureGuid, 
  LPCGUID  pRenderGuid, 
  LPCDSCBUFFERDESC  lpDscBufferDesc, 
  LPCDSBUFFERDESC  lpDsBufferDesc,
  HWND  hWnd, 
  DWORD  dwLevel, 
  LPLPDIRECTSOUNDCAPTUREBUFFER8  lplpDirectSoundCaptureBuffer8, 
  LPLPDIRECTSOUNDBUFFER8  lplpDirectSoundBuffer8
);

Parameters

pCaptureGuid

Address of the GUID that identifies the sound capture device for full duplex input. Must be one of the GUIDs returned by DirectSoundCaptureEnumerate, 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.

pRenderGuid

Address of the GUID that identifies the sound rendering device for full-duplex output. Must be one of the GUIDs returned by DirectSoundEnumerate, NULL for the default rendering device, or one of the following values:

Value Description
DSDEVID_DefaultPlayback System-wide default audio playback device.
DSDEVID_DefaultVoicePlayback Default voice playback device.

lpDscBufferDesc

Address of a DSCBUFFERDESC structure that specifies the characteristics of the capture buffer.

lpDsBufferDesc

Address of a DSBUFFERDESC structure that specifies the characteristics of the render buffer.

hWnd

Handle to the application window.

dwLevel

Cooperative level for the device. For more information, see IDirectSound8::SetCooperativeLevel.

lplpDirectSoundCaptureBuffer8

Address of a variable that receives the IDirectSoundCaptureBuffer8 interface of the capture buffer.

lplpDirectSoundBuffer8

Address of a variable that receives the IDirectSoundBuffer8 interface of the render buffer.

Return Values

If the method succeeds, the return value is DS_OK.

If it fails, the return value may be one of the following values:

Return code
DSERR_ALREADYINITIALIZED
DSERR_BADFORMAT
DSERR_GENERIC
DSERR_INVALIDPARAM
DSERR_NODRIVER
DSERR_OUTOFMEMORY
DSERR_UNINITIALIZED

Requirements

  Header: Declared in dsound.h.

  Operating System: Requires Microsoft Windows XP or later.

See Also