Commit dc224421 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

dsound: Tune some parameters to make pulseaudio work.

parent 944cb7ea
...@@ -1140,7 +1140,7 @@ IDirectSoundCaptureBufferImpl_Start( ...@@ -1140,7 +1140,7 @@ IDirectSoundCaptureBufferImpl_Start(
if (device->buffer) { if (device->buffer) {
int c; 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); device->nrofpwaves = device->buflen / blocksize + !!(device->buflen % blocksize);
TRACE("nrofpwaves=%d\n", device->nrofpwaves); TRACE("nrofpwaves=%d\n", device->nrofpwaves);
......
...@@ -90,9 +90,9 @@ HRESULT mmErr(UINT err) ...@@ -90,9 +90,9 @@ HRESULT mmErr(UINT err)
/* All default settings, you most likely don't want to touch these, see wiki on UsefulRegistryKeys */ /* All default settings, you most likely don't want to touch these, see wiki on UsefulRegistryKeys */
int ds_emuldriver = 0; int ds_emuldriver = 0;
int ds_hel_buflen = 32768; int ds_hel_buflen = 32768 * 2;
int ds_snd_queue_max = 10; int ds_snd_queue_max = 20;
int ds_snd_queue_min = 6; int ds_snd_queue_min = 14;
int ds_snd_shadow_maxsize = 2; int ds_snd_shadow_maxsize = 2;
int ds_hw_accel = DS_HW_ACCEL_FULL; int ds_hw_accel = DS_HW_ACCEL_FULL;
int ds_default_playback = 0; int ds_default_playback = 0;
......
...@@ -46,13 +46,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(dsound); ...@@ -46,13 +46,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(dsound);
*/ */
DWORD DSOUND_fraglen(DWORD nSamplesPerSec, DWORD nBlockAlign) DWORD DSOUND_fraglen(DWORD nSamplesPerSec, DWORD nBlockAlign)
{ {
DWORD fraglen = 512 * nBlockAlign; DWORD fraglen = 256 * nBlockAlign;
/* Compensate for only being roughly accurate */ /* Compensate for only being roughly accurate */
if (nSamplesPerSec <= 26000) if (nSamplesPerSec <= 26000)
fraglen /= 2; fraglen /= 2;
if (nSamplesPerSec <= 12000) if (nSamplesPerSec <= 10000)
fraglen /= 2; fraglen /= 2;
if (nSamplesPerSec >= 80000) if (nSamplesPerSec >= 80000)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment