Commit 9123f28e authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

dsound: Call DSOUND_FullDuplexCreate instead of creating it directly.

parent c9b70ddf
...@@ -745,22 +745,8 @@ DirectSoundFullDuplexCreate( ...@@ -745,22 +745,8 @@ DirectSoundFullDuplexCreate(
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
} }
/* Get dsound configuration */ hres = DSOUND_FullDuplexCreate(&IID_IDirectSoundFullDuplex, (LPDIRECTSOUNDFULLDUPLEX*)&This);
setup_dsound_options(); if (FAILED(hres)) return hres;
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 = IDirectSoundFullDuplexImpl_Initialize((LPDIRECTSOUNDFULLDUPLEX)This, hres = IDirectSoundFullDuplexImpl_Initialize((LPDIRECTSOUNDFULLDUPLEX)This,
pcGuidCaptureDevice, pcGuidCaptureDevice,
...@@ -770,7 +756,7 @@ DirectSoundFullDuplexCreate( ...@@ -770,7 +756,7 @@ DirectSoundFullDuplexCreate(
hWnd, dwLevel, ppDSCBuffer8, hWnd, dwLevel, ppDSCBuffer8,
ppDSBuffer8); ppDSBuffer8);
if (hres != DS_OK) { if (hres != DS_OK) {
HeapFree(GetProcessHeap(), 0, This); IUnknown_Release((LPDIRECTSOUNDFULLDUPLEX)This);
WARN("IDirectSoundFullDuplexImpl_Initialize failed\n"); WARN("IDirectSoundFullDuplexImpl_Initialize failed\n");
*ppDSFD = NULL; *ppDSFD = NULL;
} else } else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment