Centralized PulseAudio setup

12,328

Solution 1

Partially – easy with Linux clients, tricky with Windows.


With Linux clients this is simple – just set $PULSE_SERVER to the media server's address and copy the ~/.pulse_cookie authentication file.

PULSE_SERVER=tcp:mediaserver.home tcp6:mediaserver.home

Of course, make sure PulseAudio on the media server has the required modules loaded; most of them can be enabled via paprefs, or you could load them via ~/.pulse/default.pa on the media server:

.include /etc/pulse/default.pa
# required:
load-module module-native-protocol-tcp
load-module module-simple-protocol-tcp
# needed if you use WinESD:
load-module module-esound-protocol-tcp
# optional, might be useful if you use Avahi:
load-module module-zeroconf-publish

There is no PulseAudio client for Windows yet, although one could use the very old WinESD driver and Pulse's ESounD compatibility module, or the linco tool as described in this blog post; here is a simplified version with plink from PuTTY in place of Cygwin:

linco -B 16 -C 2 -R 44100 | plink user@mediaserver "pacat --playback"

If you use iTunes, you could run Shairport on the media server, which will make it show up on iTunes as an AirPort.

(In fact, using Shairport with PulseAudio clients (via module-raop-discover + module-raop-sink) might use less bandwidth than the uncompressed Pulse protocol, but unfortunately there are some incompatibilities preventing this from working.)

Solution 2

  1. Download the latest pulse audio release from http://www.freedesktop.org/wiki/Software/PulseAudio/Ports/Windows/Support/ (latest is v1.1 at time of writing).
  2. unpack to somewhere you want. example: c:\pulse\
  3. open c:\pulse\etc\default.pa
  4. make sure you have something similar to :
    • load-module module-native-protocol-tcp listen=0.0.0.0 auth-anonymous=1
    • set-default-sink output
  5. On your linux machine(s), open /etc/pulse/client.conf (you could possibly do the same with ~/.pulse/client.conf), make sure default-server is uncommented and set to the ip address of your windows machine (one you want to receive audio on)
  6. restart pulseaudio on the linux machine(s), ubuntu: pulseaudio -k, for other distros I imagine you'd restart the server like you do any other sudo service pulseaudio restart.
  7. On your windows machine, launch pulseaudio.exe. This should open a simple terminal with a few warnings (nothing to worry about from my experience).
  8. On your Linux machine(s), launch something that plays sound.
Share:
12,328

Related videos on Youtube

evgeniuz
Author by

evgeniuz

Updated on September 18, 2022

Comments

  • evgeniuz
    evgeniuz almost 2 years

    I want to do a setup, so that all my computers and TV use one audio system. Like this:

    enter image description here

    Where media server is connected to acoustics and TV is connected through sound-card input and other systems use PulseAudio to access acoustics through network. Is this setup possible?

  • evgeniuz
    evgeniuz over 12 years
    I knew, that this is possible with Linux and my concern was chiefly about Windows. Thanks for suggestion, I'll try it.
  • user1686
    user1686 over 12 years
    @Shark: I also found this article suggesting the use of linco. See my updated post.
  • user1686
    user1686 over 10 years
    @airtonix: A version more recent than 1.1?
  • airtonix
    airtonix over 10 years
    @grawity nope, that's the version I'm using. On my ubuntu 13.10 desktop, I just edit /etc/pulse/client.conf, uncomment default-server, set it to the ip address of my windows laptop and launch pulseaudio.exe on my windows laptop. With synergy this ends up being very nice.
  • user1686
    user1686 over 9 years
    @nass: No idea, but surely it won't be greater than the network-induced delay?
  • S0AndS0
    S0AndS0 over 7 years
    Hey that listen=127.0.0.1 worked perfect with load-module module-simple-protocol-tcp ... shown at [Simple Protocol Player](kaytat.com/blog/?page_id=301) for getting sound out of a chroot into Android via Pulse magic... next up is SonicPi on Android for mobile scripted musical composition. Thanks to @airtonix my tests'll be a bit more secure.
  • Huckle
    Huckle over 5 years
    WinESD, linco, and gleamynode.net links are all dead.