tl;dr how to reliably stream audio on demand between 2 linux machines over the network on demand?
Hello, sometimes I want to play something from my laptop through the bigger speakers of home sound system. That system is connected to another laptop that's mainly used for watching video. Initially I was thinking to buy a wireless receiver for the home sound system but it seems easier to me to just turn off the multimedia laptop and stream to it instead of changing sound system input, etc.
Since both machines are running recent fedora linux I thought that would be easy but turned out it is not so easy. Initially I attempted to use PulseAudio streaming. It actually worked but because the multimedia laptop is older and has only 54mbit wifi connection to the network, the sound often had glitches. Also I've hit a pulse audio bug that configuring local multicast broadcast PULSE_SINK actually DoSes local network (here) and (here).
So I thought that I need some more professional protocol for streaming than the raw stream pulse audio creates. I see that VLC is suggested for the purpose. But I'd like to be able to stream to the remote server only when I want. That means when I set $PULSE_SINK to some other value, the remote server should play, otherwise sound should play locally as normal.
I was wondering if anybody has done that - create a vlc listener and then create a local PulseAudio sink that send audio there if used. Otherwise don't send anything. I see how to create a VLC listener but I'm not savvy with PulseAudio and before I lose too much tie with that, I hoped somebody can tell me how to do or at least suggest that something works so I don't setup something that wouldn't work quiet as expected.
I'm open to non-vlc solutions as long as they do not flood network and audio plays without glitches.
Thank you!