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

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


vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Mar 22 20:15:10 2012 +0200| [90efd88489b1a7773133c89d89ee379d62d98ae9] | 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.
(cherry picked from commit d8a96604534966dab34ae2251d370a10f319ecd0)

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

 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