[vlc-commits] PulseAudio: force minreq to less than half tlength	(refs #7827)
    Rémi Denis-Courmont 
    git at videolan.org
       
    Thu Dec  6 22:36:10 CET 2012
    
    
  
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Dec  6 23:31:54 2012 +0200| [a1ddda85bb3cbd7ec4b7bb0aa0fd80c9a6d3afe7] | committer: Rémi Denis-Courmont
PulseAudio: force minreq to less than half tlength (refs #7827)
This should work-around distorsion due to excessively short latency
computation in PulseAudio, e.g. NVIDIA HDMI Audio.
In the longer term, VLC should probably set minreq to 40ms and tlength
to a larger value or even -1. But that would require more testing.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a1ddda85bb3cbd7ec4b7bb0aa0fd80c9a6d3afe7
---
 modules/audio_output/pulse.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c
index 452ccb7..b4465cd 100644
--- a/modules/audio_output/pulse.c
+++ b/modules/audio_output/pulse.c
@@ -791,7 +791,7 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
      * TODO? tlength could be adaptively increased to reduce wakeups. */
     attr.tlength = pa_usec_to_bytes(AOUT_MIN_PREPARE_TIME, &ss);
     attr.prebuf = 0; /* trigger manually */
-    attr.minreq = -1;
+    attr.minreq = attr.tlength / 3;
     attr.fragsize = 0; /* not used for output */
 
     sys->stream = NULL;
    
    
More information about the vlc-commits
mailing list