I've spent the last couple of months wondering this and could not find an answer on the otherwise excellent PulseAudio wiki, so I thought that I'd ask the Lazy Web:
How can I configure
/etc/pulse/client.conf to prefer a specific remote audio sink and to automatically fall back to localhost only when that remote sink is not available via Avahi?
I'm already aware of the
paprefs applet, but it requires me to manually select the remote audio sink, every time I get back home, which is not what I want.
Instead, I need the PA daemon on this laptop to always try connecting to audio.lan then to localhost and to dynamically switch back and forth between those two hosts according to info provided by the Avahi PA module: if audio.lan is reachable and an audio sink is found, switch to that; if not, fall back to localhost; if audio.lan re-appears on the Avahi radar, switch back to it.
Surely there must be a way to achieve that, but how?
PS: audio.lan runs PA in System mode with IP-based ACL, if it makes any difference.