dsound: Call DSOUND_FullDuplexCreate instead of creating it directly.

This commit is contained in:
Maarten Lankhorst 2009-11-24 14:16:52 +01:00 committed by Alexandre Julliard
parent c9b70ddf7e
commit 9123f28e46
1 changed files with 3 additions and 17 deletions

View File

@ -745,22 +745,8 @@ DirectSoundFullDuplexCreate(
return DSERR_INVALIDPARAM;
}
/* Get dsound configuration */
setup_dsound_options();
This = HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY, sizeof(IDirectSoundFullDuplexImpl));
if (This == NULL) {
WARN("out of memory\n");
*ppDSFD = NULL;
return DSERR_OUTOFMEMORY;
}
This->lpVtbl = &dsfdvt;
This->ref = 1;
This->capture_device = NULL;
This->renderer_device = NULL;
hres = DSOUND_FullDuplexCreate(&IID_IDirectSoundFullDuplex, (LPDIRECTSOUNDFULLDUPLEX*)&This);
if (FAILED(hres)) return hres;
hres = IDirectSoundFullDuplexImpl_Initialize((LPDIRECTSOUNDFULLDUPLEX)This,
pcGuidCaptureDevice,
@ -770,7 +756,7 @@ DirectSoundFullDuplexCreate(
hWnd, dwLevel, ppDSCBuffer8,
ppDSBuffer8);
if (hres != DS_OK) {
HeapFree(GetProcessHeap(), 0, This);
IUnknown_Release((LPDIRECTSOUNDFULLDUPLEX)This);
WARN("IDirectSoundFullDuplexImpl_Initialize failed\n");
*ppDSFD = NULL;
} else