[pulseaudio-discuss] How to control playback start timing (RAOP)

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Thu Oct 17 09:32:39 CEST 2013


On Wed, 2013-10-16 at 22:04 -0500, Hajime Fujita wrote:
> Hi,
> 
> I've been working on raop2 support for the raop module.
> 
> Currently when starting playback through RAOP, there is a huge delay in
> sound. 2-3 sec after starting music from a player software, actual sound
> starts being heard from the speaker.
> And as a result, there is a gap between a screen and sound. For example,
> progress counter of a player software shows "00:03" when the actual
> music begins. This would be a serious issue when playing movie.
> 
> I'm wondering how I can solve this issue. I think most of the delay is
> due to protocol initialization and impossible to reduce. So the feasible
> approach might be to tell the application that playback is not yet ready.
> 
> Is there any document or existing module from which I can learn some
> idea to address this issue?

If you want lip-sync with movies, you "only" need to provide accurate
latency information in your sink implementation. The latency reporting
is done by handling the PA_SINK_MESSAGE_GET_LATENCY message. It seems
that module-raop-sink.c (the version in upstream) already tries pretty
hard to estimate the latency accurately. I think the logic depends on
TCP's flow control, though, and if I recall correctly, you were working
on UDP support. Does the RAOP protocol have any latency reporting
functionality? If not, then you can only guess what the real latency is.

-- 
Tanu



More information about the pulseaudio-discuss mailing list