From 94c620cf95ed31add0e5ef40b0da0f571e1540de Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Thu, 1 Jan 2009 13:24:53 +0100 Subject: [PATCH] dsound: Correct amount of buffers used for playing. Fixes regression caused by ce06de420874b9983324508f8257a580fee341ca Amount of time per buffer was doubled, but amount of buffers wasn't halved, so latency was doubled. --- dlls/dsound/capture.c | 2 +- dlls/dsound/dsound_main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c index d84a8fe1593..cd051b62992 100644 --- a/dlls/dsound/capture.c +++ b/dlls/dsound/capture.c @@ -1140,7 +1140,7 @@ IDirectSoundCaptureBufferImpl_Start( if (device->buffer) { int c; - DWORD blocksize = 4 * DSOUND_fraglen(device->pwfx->nSamplesPerSec, device->pwfx->nBlockAlign); + DWORD blocksize = DSOUND_fraglen(device->pwfx->nSamplesPerSec, device->pwfx->nBlockAlign); device->nrofpwaves = device->buflen / blocksize + !!(device->buflen % blocksize); TRACE("nrofpwaves=%d\n", device->nrofpwaves); diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c index dddcf284a76..5ebf2e69654 100644 --- a/dlls/dsound/dsound_main.c +++ b/dlls/dsound/dsound_main.c @@ -91,8 +91,8 @@ HRESULT mmErr(UINT err) /* All default settings, you most likely don't want to touch these, see wiki on UsefulRegistryKeys */ int ds_emuldriver = 0; int ds_hel_buflen = 32768 * 2; -int ds_snd_queue_max = 20; -int ds_snd_queue_min = 14; +int ds_snd_queue_max = 10; +int ds_snd_queue_min = 6; int ds_snd_shadow_maxsize = 2; int ds_hw_accel = DS_HW_ACCEL_FULL; int ds_default_playback = 0;