From 054ef1239c55ee37a1e6712905b064898015a651 Mon Sep 17 00:00:00 2001 From: David Reid Date: Sat, 17 Nov 2018 17:19:30 +1000 Subject: [PATCH] PulseAudio: Tweak buffer attributes. --- mini_al.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mini_al.h b/mini_al.h index 0db3a502..17812566 100644 --- a/mini_al.h +++ b/mini_al.h @@ -12631,10 +12631,10 @@ mal_result mal_device_init__pulse(mal_context* pContext, mal_device_type type, c } attr.maxlength = bufferSizeInFrames * mal_get_bytes_per_sample(mal_format_from_pulse(ss.format))*ss.channels; - attr.tlength = attr.maxlength / pConfig->periods; + attr.tlength = attr.maxlength; attr.prebuf = (mal_uint32)-1; - attr.minreq = attr.tlength; - attr.fragsize = attr.tlength; + attr.minreq = attr.maxlength / pConfig->periods; + attr.fragsize = attr.maxlength / pConfig->periods; #ifdef MAL_DEBUG_OUTPUT printf("[PulseAudio] attr: maxlength=%d, tlength=%d, prebuf=%d, minreq=%d, fragsize=%d; bufferSizeInFrames=%d\n", attr.maxlength, attr.tlength, attr.prebuf, attr.minreq, attr.fragsize, bufferSizeInFrames);