[pulseaudio-discuss] playback latency information

pl bossart bossart.nospam at gmail.com
Fri Jan 22 13:26:29 PST 2010


This is probably a question for Lennart...

I am somewhat confused on how the playback latency should be
estimated. I was under the impression that pa_stream_get_latency() was
the way to go, but I came across some code in gstreamer/pulsesink
where the latency is retrieved with pa_stream_get_timing_info()

I however cannot figure out what the fields pa_timing_info::sink_usec
and ::configured_sink_used mean, and whether they have any
relationship with the values returned by pa_stream_get_latency(). In
my tests, I see the following values in the latency_cb() routine

sink latency 0, configured_sink_usec 90000 sink_usec 0
sink latency 0, configured_sink_usec 90000 sink_usec 87213
sink latency 0, configured_sink_usec 90000 sink_usec 86998
sink latency 0, configured_sink_usec 90000 sink_usec 86724
sink latency 242259, configured_sink_usec 90000 sink_usec 88696
sink latency 482473, configured_sink_usec 90000 sink_usec 88568
sink latency 473523, configured_sink_usec 90000 sink_usec 90064
sink latency 477102, configured_sink_usec 90000 sink_usec 89338

Which of these three values shall be provided to the gstreamer (or
other middleware) pipeline to represent the back-end delay?
Thanks for your feedback.
- Pierre



More information about the pulseaudio-discuss mailing list