Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:hwsnemo
wine
audiolatency.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File audiolatency.patch of Package wine
diff --git a/dlls/winealsa.drv/alsa.c b/dlls/winealsa.drv/alsa.c index 0f2211d..8c46d40 100644 --- a/dlls/winealsa.drv/alsa.c +++ b/dlls/winealsa.drv/alsa.c @@ -830,6 +830,17 @@ static NTSTATUS alsa_create_stream(void *args) } } + int penv = atoi(getenv("STAGING_AUDIO_PERIOD")); + if (penv >= 1) { + params->period = penv; + TRACE("alsa period: %lld\n", params->period); + } + int denv = atoi(getenv("STAGING_AUDIO_DURATION")); + if (denv >= 1) { + params->duration = denv; + TRACE("alsa duration: %lld\n", params->duration); + } + if (FAILED(params->result)) return STATUS_SUCCESS; diff --git a/dlls/winepulse.drv/pulse.c b/dlls/winepulse.drv/pulse.c index ab49a4c..289af69 100644 --- a/dlls/winepulse.drv/pulse.c +++ b/dlls/winepulse.drv/pulse.c @@ -738,11 +738,17 @@ static void pulse_probe_settings(int render, const char *pulse_name, WAVEFORMATE if (length) *def_period = *min_period = pa_bytes_to_usec(10 * length, &ss); - if (*min_period < MinimumPeriod) - *min_period = MinimumPeriod; - - if (*def_period < DefaultPeriod) - *def_period = DefaultPeriod; + const char* penv = getenv("STAGING_AUDIO_PERIOD"); + int val; + if (!penv) { + if (*min_period < MinimumPeriod) + *min_period = MinimumPeriod; + if (*def_period < DefaultPeriod) + *def_period = DefaultPeriod; + } else if ((val = atoi(penv)) >= 0) { + *def_period = *min_period = val; + TRACE("Audio period set to %d.\n", val); + } wfx->wFormatTag = WAVE_FORMAT_EXTENSIBLE; wfx->cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX); @@ -1162,6 +1168,13 @@ static NTSTATUS pulse_create_stream(void *args) stream->def_period = period; + const char* denv = getenv("STAGING_AUDIO_DURATION"); + if (denv) { + int val = atoi(denv); + duration = val; + TRACE("Audio duration set to %d.\n", val); + } + stream->period_bytes = pa_frame_size(&stream->ss) * muldiv(period, stream->ss.rate, 10000000); stream->bufsize_frames = ceil((duration / 10000000.) * params->fmt->nSamplesPerSec);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor