Most Linux systems already include a multi-room sound system, it’s called PulseAudio
I have been figuring out how to make a multi-room sound system for my home (mainly for clock chimes). I considered Snapcast, I looked at Volumio, but all along I never realized a basic solution has been right in front of me staring at my face.
What I needed was something that would allow me to broadcast sounds (mainly clock chimes, recently also TV program announcements), and the sound should play in both my room (ordinary PC running Ubuntu) and the living room (Raspberry Pi running some flavour of OSMC). I tried Snapcast; I could not make it work.
The solution turned out to be PulseAudio, the default sound system on most Linux systems.
- module_rtp_send needs the loop=1 parameter. This makes sure all PulseAudio servers will play every broadcast (otherwise PulseAudio will not play any sound that’s being broadcast from the same computer).
- module_rtp_recv needs the sink parameter set to the Name of the correct speaker if PulseAudio is controlling multiple speakers (which is usually the case these days because the HDMI port counts as a speaker). This avoids playing broadcasts on random speakers.
On laptops you might need to write a script to monitor your location and load/unload these modules as appropriate.
PulseAudio solves my problem (clock chimes) perfectly.
I’ve yet to see if it’s good enough for more demanding tasks like radio broadcasts;
but with RTP working it’s probably not too hard to layer something better on top of PulseAudio.
Now I have to solve my other multi-room problem: mesh wifi.