[vlc-commits] PulseAudio: increase buffer size to max VLC can do

Rémi Denis-Courmont git at videolan.org
Sat Apr 2 23:47:43 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Apr  3 00:46:06 2011 +0300| [39b85ca6ba871a9e66c7d277e2ba4db72cadb8d8] | committer: Rémi Denis-Courmont

PulseAudio: increase buffer size to max VLC can do

This suppresses most hiccups. But it also decreases precision to
slightly noticeable levels: about +/-150ms here. For reference, our
audio output core target is +/-40ms.

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

 modules/audio_output/pulse.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c
index 31899d0..e1b84d6 100644
--- a/modules/audio_output/pulse.c
+++ b/modules/audio_output/pulse.c
@@ -347,8 +347,8 @@ static int Open(vlc_object_t *obj)
     const uint32_t byterate = pa_bytes_per_second(&ss);
     struct pa_buffer_attr attr;
     /* no point in larger buffers on PA side than VLC */
-    attr.maxlength = byterate * AOUT_MAX_ADVANCE_TIME / CLOCK_FREQ;
-    attr.tlength = byterate * AOUT_MAX_PREPARE_TIME / CLOCK_FREQ;
+    attr.maxlength = -1;
+    attr.tlength = byterate * AOUT_MAX_ADVANCE_TIME / CLOCK_FREQ;
     attr.prebuf = byterate * AOUT_MIN_PREPARE_TIME / CLOCK_FREQ;
     attr.minreq = -1;
     attr.fragsize = 0; /* not used for output */



More information about the vlc-commits mailing list