Streaming Audio on your LAN

module-tunnel-sink-new is the way to do it, trust me because I have tried several other ways but this one gives the lowest latency.

Configure the server

On the box connected to the speaker, install pulseaudio. In my case, this box is a raspberrypi 3, Operating system: OSMC

I stopped Kodi (the mediacenter application in OSMC) before installing pulseaudio:

# service mediacenter stop # apt-get install pulseaudio

$ pulseaudio —start $ pactl load-module module-native-protocol-tcp auth-ip-acl=192.168.0.5

If you want, you can start mediacenter again and it will use pulseaudio for the rest of the session.

Configure the client

On the box which interprets the digital music file and to an audiostream and sends this stream to the server, make sure pulseaudio runs (pulseaudio is automatically started at login by my login manager).

$ ps aux grep [p]ulse

hans 19831 0.0 0.1 1207392 14804 ? S<l 17:44 0:13 pulseaudio —start hans 19835 0.0 0.0 127888 4768 ? S 17:44 0:00 /usr/lib/x86_64-linux-gnu/pulse/gconf-helper

Good, it is running.

Find out the IP address of your server, my server was at 192.168.0.4

run pactl on the client with these arguments, (you can substitute "MyOSMC" with another name, if you want)

$ pactl load-module module-tunnel-sink-new server=192.168.0.4 sink_name=MyOSMC

Now you can seamlessly (more or less) move the audio stream back and forth between headphones in the client and speakers connected to the server.

What wrong with airplay, or running native pulse audio server remotely?

comments powered by Disqus


Back to the index

Blog roll

R-bloggers, Debian Weekly
Valid XHTML 1.0 Strict [Valid RSS] Valid CSS! Emacs Muse Last modified: oktober 12, 2017