<html><head></head><body>As per last week, this cannot be right. Audio starting too early means that you fed a too early start time.<br><br><div class="gmail_quote">Le 27 juin 2018 15:41:35 GMT+03: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">The start from the latency callback was too early (before the system date) and<br>caused frame drop for the other ESes (when audio is the master clock source).<br>---<br> modules/audio_output/pulse.c | 22 ++--------------------<br> 1 file changed, 2 insertions(+), 20 deletions(-)<br><br>diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c<br>index f999eb534b..8f8d5d2bdf 100644<br>--- a/modules/audio_output/pulse.c<br>+++ b/modules/audio_output/pulse.c<br>@@ -252,19 +252,6 @@ static void stream_start(pa_stream *s, audio_output_t *aout, vlc_tick_t date)<br> }<br> }<br> <br>-static void stream_latency_cb(pa_stream *s, void *userdata)<br>-{<br>- audio_output_t *aout = userdata;<br>- aout_sys_t *sys = aout->sys;<br>-<br>- /* This callback is _never_ called while paused. */<br>- if (sys->first_pts == VLC_TS_INVALID)<br>- return; /* nothing to do if buffers are (still) empty */<br>- if (pa_stream_is_corked(s) > 0)<br>- stream_start(s, aout, sys->first_date);<br>-}<br>-<br>-<br> /*** Stream helpers ***/<br> static void stream_state_cb(pa_stream *s, void *userdata)<br> {<br>@@ -539,13 +526,9 @@ static void Pause(audio_output_t *aout, bool paused, vlc_tick_t date)<br> pa_threaded_mainloop_lock(sys->mainloop);<br> <br> if (paused) {<br>- pa_stream_set_latency_update_callback(s, NULL, NULL);<br> stream_stop(s, aout);<br>- } else {<br>- pa_stream_set_latency_update_callback(s, stream_latency_cb, aout);<br>- if (likely(sys->first_pts != VLC_TS_INVALID))<br>- stream_start_now(s, aout);<br>- }<br>+ } else if (likely(sys->first_pts != VLC_TS_INVALID))<br>+ stream_start_now(s, aout);<br> <br> pa_threaded_mainloop_unlock(sys->mainloop);<br> (void) date;<br>@@ -928,7 +911,6 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)<br> pa_stream_set_state_callback(s, stream_state_cb, sys->mainloop);<br> pa_stream_set_buffer_attr_callback(s, stream_buffer_attr_cb, aout);<br> pa_stream_set_event_callback(s, stream_event_cb, aout);<br>- pa_stream_set_latency_update_callback(s, stream_latency_cb, aout);<br> pa_stream_set_moved_callback(s, stream_moved_cb, aout);<br> pa_stream_set_overflow_callback(s, stream_overflow_cb, aout);<br> pa_stream_set_started_callback(s, stream_started_cb, aout);</pre></blockquote></div><br>
-- <br>
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>