[pulseaudio-discuss] Issue connecting a null-sink to a tunnel sink
Olivier Delbeke
olivier.delbeke at gmail.com
Wed Oct 14 23:40:43 PDT 2015
Hi Georg,
Thanks a lot for your help.
I tested your suggestion : instead of pushing the audio into a
"tunnel-sink" on the source unit, I pull the audio from a "tunnel-source"
on the destination unit. And it works !
On my source/main unit, I now only have null-sinks. I can do all the
routing I want between them using module-loopback.
On the destination unit (raspberry PI), I now have tunnel-sources pulling
the data from the main unit, and I have module-loopbacks that forward the
audio to the ALSA outputs.
It is however not clear to me why my configuration based on tunnel-sink at
the source side did not work. Does the tunnel need to be on the unit with
the ALSA hardware ? ( That could make sense. )
Best regards,
Olivier
On Wed, Oct 14, 2015 at 6:37 PM, Georg Chini <georg at chini.tk> wrote:
> On 14.10.2015 17:18, Olivier Delbeke wrote:
>
> Hi all,
>
> I'm struggling with a pulseaudio configuration that I expected to be
> working out-of-the box (as it seems very simple).
>
> I have :
> * a null-sink "mynullsink"
> * a tunnel-sink "mytunnel"
> * a module-loopback to connect "mynullsink.monitor" to "mytunnel"
>
> Content of /etc/pulse/default.pa is here (full content):
> load-module
> module-native-protocol-unix
>
> load-module
> module-suspend-on-idle
>
> load-module module-null-sink
> sink_name=mynullsink
>
> load-module module-tunnel-sink sink_name=mytunnel server=tcp:
> 192.168.100.3:4713 sink=remotesink
>
> Playing a wav file directly to the tunnel works fine, all the time :
> paplay sample1.wav -d mytunnel
> => audio sent correctly through the tunnel
> However, I can see with "pacmd list-sinks" that "mytunnel" has a
> "current latency" of 0ms. Normal ?
>
> To connect the null-sink and the tunnel, I do this (with either pactl or
> pacmd) :
> pacmd load-module module-loopback source=mynullsink.monitor sink=mytunnel
> => The module is correctly loaded (as I can see with "pacmd
> list-modules")
>
> But playing audio to the null-sink does not work (i.e., no sound is
> forwarded to the tunnel by the loopback) :
> paplay sample1.wav -d mynullsink
> => NO AUDIO. NO ERROR MESSAGE. VOLUMES AT 100%. STATE RUNNING
>
> With pulseaudio 6.0, I see that the latency calculated by the
> module-loopback is increased by 10s every 10s :
> D: [pulseaudio] module-loopback.c: Loopback overall latency is 21552.00 ms
> + 0.00 ms + 0.00 ms = 21552.00 ms
> D: [pulseaudio] module-loopback.c: Should buffer 0 bytes, buffered at
> minimum 0 bytes
> D: [pulseaudio] module-loopback.c: [mytunnel] Updated sampling rate to
> 48000 Hz.
> D: [pulseaudio] module-loopback.c: Loopback overall latency is 31524.00 ms
> + 0.00 ms + 0.00 ms = 31524.00 ms
> D: [pulseaudio] module-loopback.c: Should buffer 0 bytes, buffered at
> minimum 0 bytes
> D: [pulseaudio] module-loopback.c: [mytunnel] Updated sampling rate to
> 48000 Hz.
>
> With pulseaudio 4.0, the latency moves around 250ms, but there is also no
> audio.
>
> There seems to be a very unexpected workaround : loading the loopback
> module twice ! When I do that, I get audio, but it's slightly disturbed
> (sounds like an old vinyl record).
>
> What is happening ? Does anyone have a hint ?
> Why can't I chain a null sink to a tunnel sink using a loopback module ?
>
> Thank you and best regards,
>
> Olivier
>
>
>
> Hi Olivier,
>
> I wonder if you also loaded module-native-protocol-tcp somewhere. I think
> you need
> it for tunneling. Did you try to use a standard default.pa?
>
> A while ago I tried a similar setup, but instead of tunnel_sink I used
> tunnel_source:
>
> On the source machine (my local network is 192.168.255.0/24):
>
> load-module module-native-protocol-tcp auth-ip-acl='127.0.0.1;
> 192.168.255.0/24'
> load-module module-null-sink sink_name=my_sink channels=2 rate=44100
>
> Then I played the stream back to my_sink.
>
> On the destination machine:
>
> load-module module-tunnel-source server=192.168.255.x
> source_name=remote_source source=my_sink.monitor
> load-module module-loopback source=remote_source
>
> This worked fine and has the advantage that you can easily connect (or
> re-connect) the
> same stream from multiple clients. Maybe you can try it this way.
>
> Regards
> Georg
>
>
>
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20151015/d207539a/attachment.html>
More information about the pulseaudio-discuss
mailing list