[pulseaudio-discuss] RTP delay and another problem

Jonathan Abrams jonathan.abrams at windriver.com
Tue Jun 30 09:20:32 PDT 2009


Lennart Poettering wrote:
> On Mon, 15.06.09 16:36, Jonathan Abrams (jonathan.abrams at windriver.com) wrote:
>
>   
>> Hey folks,
>> I've been having a couple issues with RTP. I'm using pulseaudio 0.9.15.
>> For some background, I have a system set up where I have one machine  
>> running module-rtp-send, attached to the monitor of a null sink. The  
>> receiving machine has module-rtp-recv loaded, that then attaches to a  
>> null sink. This allows me to hook up applications to RTP as if it were  
>> any other device. So far so good!
>>
>> Here are my problems:
>> 1) When I make a connection and start to play some audio there's an  
>> approximately 5 second delay before audio is heard on the receiving end. 
>> These 5 seconds also appear to be 'lost', not just buffered. What could 
>> be causing this? Is this a known issue or a bug, or just how it normally 
>> works? Is there a workaround or fix?
>>     
>
> Uh. This might be the SAP pickup time. Dunno.
>
>   
>> 2) Because I sometimes need to connect the RTP stream (being passed  
>> through a null sink) to a device instead of an application, I use a  
>> 'pacat -r -d <deviceid1> | pacat -p -d <deviceid2>' loopback. This
>> will 
>>     
>
> The clocks of those two devices don't need to be in sync, so this must
> dropout sooner or later. 
>
> But why are doing this anyway? You can just load module-rtp-recv on
> the right sink and have it deal with the clock deviations.
>   
> Lennart
>
>   

Thanks very much for the response Lennart.

The reason we are doing this is because we are creating an audio 
management system that manages audio devices on different logical audio 
'buses'. In most cases, applications can connect to a logical bus by 
connecting to the source/sink that represents the bus on that host. In 
order to use RTP this way, we need to make it appear in pulseaudio as 
sources/sinks, (not as source-outputs/sink-inputs). Tying RTP streams to 
null sinks works fine for the most common use case (connecting an 
application to a 'bus'), but we also need to be able to 'bridge' buses. 
This is where connecting sources directly to sinks is required. We are 
doing this using pacat and pipes. But obviously this is insufficient due 
to the source and sink having different clocks. The FAQ on the 
pulseaudio website recommends using the pacat pipe method for connecting 
a microphone directly to speakers. Does it work in that scenario because 
the microphone and speakers use the same clock? Is there another way to 
connect a source to a sink that is clock agnostic?

Thanks again,
Jonathan



More information about the pulseaudio-discuss mailing list