[pulseaudio-discuss] Configurable Latency for DLNA / Network Audio Streaming

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Thu Nov 14 23:18:54 PST 2013


On Thu, 2013-11-14 at 11:22 -0500, Simon Boulet wrote:
> Hi,
> 
> I have a set of SONOS speakers. Currently I can stream my audio to the
> SONOS system through DLNA. I have successfully configured Rygel to work
> with PulseAudio. It works great, however the best I could do is get ~1
> second latency (encoding the stream to FLAC - the only encoding type I
> could get my SONOS to accept - and streaming it to the SONOS, which I turn
> does its own decoding / encoding and wirelessly stream to the desired
> speakers). This make the setup unusable for movies playback or games (I'm
> especially interested in movies, for games I'm using headphones anyway...).
> 
> I noticed that PulseAudio as a "device latency offset" options and is
> capable of informing the upper layer (applications etc.) of the audio
> subsystem latency. I was wondering if it is possible to create a "virtual
> device" with a configurable latency (ex. 1 second latency) to offset the
> DLNA streaming / encoding / decoding delay. I think the tunnel driver is
> using something similar to keep the source and target in sync. When
> watching movies I would set the output devices for the video applications
> to the virtual latency-enabled device. This would signal the application
> that audio as a 1 second latency (and I suppose video playback would take
> this into account for the video output?)
> 
> Can anyone confirm if this is feasible, and perhaps share some thoughts
> about how it can be done.

I think this is not feasible. The latency offset is tied to ports, which
means that it's only available for ALSA and Bluetooth devices.

There's no fundamental reason why the latency offset couldn't also be
set for devices that don't have ports (such as the DLNA output), but
currently the code is what it is. Patches welcome...

-- 
Tanu



More information about the pulseaudio-discuss mailing list