[pulseaudio-tickets] [PulseAudio] #940: module-combine-sink: Latency tracking is broken

PulseAudio trac-noreply at tango.0pointer.de
Mon Jun 6 18:30:28 PDT 2011


#940: module-combine-sink: Latency tracking is broken
---------------------+------------------------------------------------------
  Reporter:  forest  |       Owner:  lennart         
      Type:  defect  |      Status:  closed          
 Milestone:          |   Component:  module-combine-*
Resolution:  fixed   |    Keywords:                  
---------------------+------------------------------------------------------

Comment(by forest):

 Hi,

 I will test your VLC patches when I have a chance.  I haven't looked
 closely at them yet.  I am assuming they don't fix things with VLC's ALSA
 audio output module, which is actually what I'm currently using.  I don't
 mind switching to the PulseAudio output module, but I think it would be
 good of both worked.

 To be frank, I actually suspect that it may not be the size of the latency
 that is causing problems.  I think that VLC just assumes that latency
 behavior will be very similar to latency presented by a real hardware
 buffer, and I think something in the signal chain is causing that
 assumption to be violated.  I do not have much experience with audio
 programming, so it's possible my gut is wrong here.  I have also found it
 difficult to track end-to-end latency issues with all of the smoothers in
 the chain averaging things out.

 I *can* tell you that (in my testing, at least) the first chunk that is
 read from the sink input immediately after VLC begins playing is a full
 block (BLOCK_USEC us) of silence.  My understanding is that this happens
 because the sink input has not received any audio from VLC when the sink
 requests the first chunk.  This causes early latency estimates from the
 sink to be zero for at least BLOCK_USEC us since the smoother has already
 started when that chunk is read.  After that first chunk, we start seeing
 much smaller chunks with audio data from VLC.  I've assumed that the sink
 input adds in latency to compensate, but I don't know the PA code at all.
 Maybe someone more familiar with the code can confirm this.

 Thanks,
 Forest

-- 
Ticket URL: <http://pulseaudio.org/ticket/940#comment:8>
PulseAudio <http://pulseaudio.org/>
The PulseAudio Sound Server


More information about the pulseaudio-bugs mailing list