[vlc-commits] PulseAudio: adjust overall latency, not (only) the buffer size

Rémi Denis-Courmont git at videolan.org
Thu Mar 22 19:19:32 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Mar 22 20:15:10 2012 +0200| [d8a96604534966dab34ae2251d370a10f319ecd0] | committer: Rémi Denis-Courmont

PulseAudio: adjust overall latency, not (only) the buffer size

Without this flag, PulseAudio will tweak the buffer parameters, but
will not account for hardware latencies. As a consequence, the live
caching parameter is not really followed - the latency is longer.

Longer latency becomes a big problem when trying to synch with another
live source (such as a V4L2 video capture device). Then audio is too
late and gets discarded or messed up at output.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d8a96604534966dab34ae2251d370a10f319ecd0
---

 modules/access/pulse.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/modules/access/pulse.c b/modules/access/pulse.c
index 8a5818f..1c893cd 100644
--- a/modules/access/pulse.c
+++ b/modules/access/pulse.c
@@ -287,6 +287,7 @@ static int Open(vlc_object_t *obj)
 
     const pa_stream_flags_t flags = PA_STREAM_INTERPOLATE_TIMING
                                   | PA_STREAM_AUTO_TIMING_UPDATE
+                                  | PA_STREAM_ADJUST_LATENCY
                                   | PA_STREAM_FIX_FORMAT
                                   | PA_STREAM_FIX_RATE
                                   /*| PA_STREAM_FIX_CHANNELS*/;



More information about the vlc-commits mailing list