<html><head></head><body>This seems to use the jitter as a input/output parameter, but the Doxygen says it's output.<br><br>And adjusting the period according to jitter is very confused, since jitter is a statistic that gets computed during playback while period is a predetermined value.<br><br><div class="gmail_quote">Le 5 février 2019 12:46:23 GMT+02:00, Thomas Guillem <thomas@gllm.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail"><hr> modules/audio_output/pulse.c | 9 +++++----<br> 1 file changed, 5 insertions(+), 4 deletions(-)<br><br>diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c<br>index 8be4004534..9a24d0f9f9 100644<br>--- a/modules/audio_output/pulse.c<br>+++ b/modules/audio_output/pulse.c<br>@@ -785,14 +785,17 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt,<br> | PA_STREAM_AUTO_TIMING_UPDATE<br> | PA_STREAM_FIX_RATE;<br> <br>+ vlc_tick_t period = *jitter / 2;<br>+ assert(period >= AOUT_MAX_PTS_ADVANCE);<br>+<br> struct pa_buffer_attr attr;<br> attr.maxlength = -1;<br> /* PulseAudio goes berserk if the target length (tlength) is not<br> * significantly longer than 2 periods (minreq), or when the period length<br> * is unspecified and the target length is short. */<br>- attr.tlength = pa_usec_to_bytes(3 * AOUT_MIN_PREPARE_TIME, &ss);<br>+ attr.tlength = pa_usec_to_bytes(3 * period, &ss);<br> attr.prebuf = 0; /* trigger manually */<br>- attr.minreq = pa_usec_to_bytes(AOUT_MIN_PREPARE_TIME, &ss);<br>+ attr.minreq = pa_usec_to_bytes(period, &ss);<br> attr.fragsize = 0; /* not used for output */<br> <br> pa_cvolume *cvolume = NULL, cvolumebuf;<br>@@ -819,7 +822,6 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt,<br> /* Setup low latency in order to quickly react to ambisonics<br> * filters viewpoint changes. */<br> flags |= PA_STREAM_ADJUST_LATENCY;<br>- attr.tlength = pa_usec_to_bytes(3 * AOUT_MIN_PREPARE_TIME, &ss);<br> }<br> <br> if (encoding != PA_ENCODING_PCM)<br>@@ -963,7 +965,6 @@ fail:<br> pa_threaded_mainloop_unlock(sys->mainloop);<br> Stop(aout);<br> return VLC_EGENERIC;<br>- VLC_UNUSED(jitter);<br> }<br> <br> /**</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>