dsound: Acceleration fixes for wavein emulation.

This commit is contained in:
Maarten Lankhorst 2007-08-04 11:11:17 +02:00 committed by Alexandre Julliard
parent abe8c127d9
commit c3ebd3652a
1 changed files with 9 additions and 9 deletions

View File

@ -1494,8 +1494,6 @@ HRESULT IDirectSoundCaptureBufferImpl_Create(
} }
} else { } else {
DWORD flags = CALLBACK_FUNCTION; DWORD flags = CALLBACK_FUNCTION;
if (ds_hw_accel != DS_HW_ACCEL_EMULATION)
flags |= WAVE_DIRECTSOUND;
err = mmErr(waveInOpen(&(device->hwi), err = mmErr(waveInOpen(&(device->hwi),
device->drvdesc.dnDevNode, device->pwfx, device->drvdesc.dnDevNode, device->pwfx,
(DWORD_PTR)DSOUND_capture_callback, (DWORD)device, flags)); (DWORD_PTR)DSOUND_capture_callback, (DWORD)device, flags));
@ -1584,16 +1582,18 @@ HRESULT DirectSoundCaptureDevice_Initialize(
*ppDevice = device; *ppDevice = device;
device->guid = devGUID; device->guid = devGUID;
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&(device->driver),0)); /* Disable the direct sound driver to force emulation if requested. */
if ( (err != DS_OK) && (err != DSERR_UNSUPPORTED) ) { device->driver = NULL;
WARN("waveInMessage failed; err=%x\n",err); if (ds_hw_accel > DS_HW_ACCEL_EMULATION)
return err; {
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDIFACE,(DWORD_PTR)&(device->driver),0));
if ( (err != DS_OK) && (err != DSERR_UNSUPPORTED) ) {
WARN("waveInMessage failed; err=%x\n",err);
return err;
}
} }
err = DS_OK; err = DS_OK;
/* Disable the direct sound driver to force emulation if requested. */
if (ds_hw_accel == DS_HW_ACCEL_EMULATION)
device->driver = NULL;
/* Get driver description */ /* Get driver description */
if (device->driver) { if (device->driver) {