Module: wine Branch: master Commit: c3ebd3652a76298c26037e8f79cb75c2f913c234 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c3ebd3652a76298c26037e8f79...
Author: Maarten Lankhorst m.b.lankhorst@gmail.com Date: Sat Aug 4 11:11:17 2007 +0200
dsound: Acceleration fixes for wavein emulation.
---
dlls/dsound/capture.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c index 34c36dd..2ee27ae 100644 --- a/dlls/dsound/capture.c +++ b/dlls/dsound/capture.c @@ -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;
- 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; + /* 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) {