<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Yes, it's better to use the period as an IN/OUT parameter and let the core calculate the jitter from it. </div><div><br></div><div>On Tue, Feb 5, 2019, at 12:29, Rémi Denis-Courmont wrote:<br></div><blockquote type="cite" id="fastmail-quoted"><div>This seems to use the jitter as a input/output parameter, but the Doxygen says it's output.<br></div><div><br></div><div>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></div><div><br></div><div class="fastmail-quoted-gmail_quote"><div>Le 5 février 2019 12:46:23 GMT+02:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;" class="fastmail-quoted-gmail_quote"><pre class="fastmail-quoted-k9mail"><div><hr> modules/audio_output/pulse.c | 9 +++++----<br></div><div> 1 file changed, 5 insertions(+), 4 deletions(-)<br></div><div><br></div><div>diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c<br></div><div>index 8be4004534..9a24d0f9f9 100644<br></div><div>--- a/modules/audio_output/pulse.c<br></div><div>+++ b/modules/audio_output/pulse.c<br></div><div>@@ -785,14 +785,17 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt,<br></div><div>                             | PA_STREAM_AUTO_TIMING_UPDATE<br></div><div>                             | PA_STREAM_FIX_RATE;<br></div><div> <br></div><div>+    vlc_tick_t period = *jitter / 2;<br></div><div>+    assert(period >= AOUT_MAX_PTS_ADVANCE);<br></div><div>+<br></div><div>     struct pa_buffer_attr attr;<br></div><div>     attr.maxlength = -1;<br></div><div>     /* PulseAudio goes berserk if the target length (tlength) is not<br></div><div>      * significantly longer than 2 periods (minreq), or when the period length<br></div><div>      * is unspecified and the target length is short. */<br></div><div>-    attr.tlength = pa_usec_to_bytes(3 * AOUT_MIN_PREPARE_TIME, &ss);<br></div><div>+    attr.tlength = pa_usec_to_bytes(3 * period, &ss);<br></div><div>     attr.prebuf = 0; /* trigger manually */<br></div><div>-    attr.minreq = pa_usec_to_bytes(AOUT_MIN_PREPARE_TIME, &ss);<br></div><div>+    attr.minreq = pa_usec_to_bytes(period, &ss);<br></div><div>     attr.fragsize = 0; /* not used for output */<br></div><div> <br></div><div>     pa_cvolume *cvolume = NULL, cvolumebuf;<br></div><div>@@ -819,7 +822,6 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt,<br></div><div>         /* Setup low latency in order to quickly react to ambisonics<br></div><div>          * filters viewpoint changes. */<br></div><div>         flags |= PA_STREAM_ADJUST_LATENCY;<br></div><div>-        attr.tlength = pa_usec_to_bytes(3 * AOUT_MIN_PREPARE_TIME, &ss);<br></div><div>     }<br></div><div> <br></div><div>     if (encoding != PA_ENCODING_PCM)<br></div><div>@@ -963,7 +965,6 @@ fail:<br></div><div>     pa_threaded_mainloop_unlock(sys->mainloop);<br></div><div>     Stop(aout);<br></div><div>     return VLC_EGENERIC;<br></div><div>-    VLC_UNUSED(jitter);<br></div><div> }<br></div><div> <br></div><div> /**<br></div></pre></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></body></html>