Skip to content

Instantly share code, notes, and snippets.

@krei-se
Last active May 15, 2024 05:08
Show Gist options
  • Save krei-se/9bdd1432101532c8254d09df134bed78 to your computer and use it in GitHub Desktop.
Save krei-se/9bdd1432101532c8254d09df134bed78 to your computer and use it in GitHub Desktop.
Pulseaudio multiroom "suddenly it works"-solution (/etc/pipewire/pipewire-pulse.conf.d)
# apply this on all clients that will receive audio from other stations. The ACL is set so any device in the local network has access without the need for authentication
context.exec = [
{ path = "pactl" args = "load-module module-native-protocol-tcp auth-anonymous=yes listen=10.126.5.1 auth-ip-acl=127.0.0.1;10.126.0.0/16" }
]
# apply this (additionally to the native-protol 50) on all clients that receive audio from other stations to publish their sinks.
context.exec = [
{ path = "pactl" args = "load-module module-zeroconf-publish" }
]
# apply this on all servers that play audio to other stations (you can have all stations as both though)
# i use latency 400 here, but usually 100 or 200 will work if you are *nal about latency over network. My network is mostly wireless and i only play web stream audio over multiroom. All gaming is local, so latency is not an issue there
# the latency line is the only buffer adjustment you will need to have all clients in sync without crackling. ignore all hints about frequency or buffer and quant sizes. Those will never work correctly. Just set the latency on the server.
context.modules = [
{ name = libpipewire-module-zeroconf-discover
args = { pulse.latency=400 }
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment