Module: wine Branch: master Commit: dc224421416bd2616bfd52431388a6f9630bc860 URL: http://source.winehq.org/git/wine.git/?a=commit;h=dc224421416bd2616bfd524313...
Author: Maarten Lankhorst m.b.lankhorst@gmail.com Date: Mon Aug 18 21:00:26 2008 +0200
dsound: Tune some parameters to make pulseaudio work.
---
dlls/dsound/capture.c | 2 +- dlls/dsound/dsound_main.c | 6 +++--- dlls/dsound/primary.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c index c9444a4..7cf7b83 100644 --- a/dlls/dsound/capture.c +++ b/dlls/dsound/capture.c @@ -1140,7 +1140,7 @@ IDirectSoundCaptureBufferImpl_Start(
if (device->buffer) { int c; - DWORD blocksize = DSOUND_fraglen(device->pwfx->nSamplesPerSec, device->pwfx->nBlockAlign); + DWORD blocksize = 4 * 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 31078cb..dddcf28 100644 --- a/dlls/dsound/dsound_main.c +++ b/dlls/dsound/dsound_main.c @@ -90,9 +90,9 @@ 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; -int ds_snd_queue_max = 10; -int ds_snd_queue_min = 6; +int ds_hel_buflen = 32768 * 2; +int ds_snd_queue_max = 20; +int ds_snd_queue_min = 14; int ds_snd_shadow_maxsize = 2; int ds_hw_accel = DS_HW_ACCEL_FULL; int ds_default_playback = 0; diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c index 112bb39..7ad561f 100644 --- a/dlls/dsound/primary.c +++ b/dlls/dsound/primary.c @@ -46,13 +46,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(dsound); */ DWORD DSOUND_fraglen(DWORD nSamplesPerSec, DWORD nBlockAlign) { - DWORD fraglen = 512 * nBlockAlign; + DWORD fraglen = 256 * nBlockAlign;
/* Compensate for only being roughly accurate */ if (nSamplesPerSec <= 26000) fraglen /= 2;
- if (nSamplesPerSec <= 12000) + if (nSamplesPerSec <= 10000) fraglen /= 2;
if (nSamplesPerSec >= 80000)