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 {
DWORD flags = CALLBACK_FUNCTION;
if (ds_hw_accel != DS_HW_ACCEL_EMULATION)
flags |= WAVE_DIRECTSOUND;
err = mmErr(waveInOpen(&(device->hwi),
device->drvdesc.dnDevNode, device->pwfx,
(DWORD_PTR)DSOUND_capture_callback, (DWORD)device, flags));
@ -1584,16 +1582,18 @@ HRESULT DirectSoundCaptureDevice_Initialize(
*ppDevice = device;
device->guid = devGUID;
/* Disable the direct sound driver to force emulation if requested. */
device->driver = NULL;
if (ds_hw_accel > DS_HW_ACCEL_EMULATION)
{
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;
/* Disable the direct sound driver to force emulation if requested. */
if (ds_hw_accel == DS_HW_ACCEL_EMULATION)
device->driver = NULL;
/* Get driver description */
if (device->driver) {