Our final setup will be as follows:
Building 1:
- 1.1. Computer with Speaker on 1st Floor
- 1.2. Computer with Speaker and Microphone on the 2nd floor
- 1.3. Computer with Speaker on 3rd Floor
Building 2 (150 feet away from Building 1)
- 2.1. Computer with Speaker on 1st Floor
Building 3 (30 feet away from Building 2)
- 3.1. Computer with Speaker on 1st Floor
We use 1.2 as our primary sound server, sending audio streams to 1.1, 1.3, 2.1, 3.1, and of course, to itself. To get the Mic working, we use the module-loopback to redirect Mic Source to Speaker Sink. Because dynamic automatic configuration of the module-combine does not work for remote tunnels, I installed a rather crude bash script/cron job to poll when sound servers become online and reconfigure module-combine.
!# /bin/bash
success=0
# Default Sink is the hardware sink
slaves=alsa_output.pci-0000_00_14.2.analog-stereo
# try to load each network sinks
pactl load-module module-tunnel-sink server=server1.local && success=1
pactl load-module module-tunnel-sink server=server2.local && success=1
pactl load-module module-tunnel-sink server=server3.local && success=1
pactl list | grep server1.local && slaves=${slaves},tunnel-sink.server1.local
pactl list | grep server2.local && slaves=${slaves},tunnel-sink.server2.local
pactl list | grep server3.local && slaves=${slaves},tunnel-sink.server3.local
# Only revise combo sink if slaves was changed
if [ "$success" = "1" ]; then
pactl unload-module $(cat tmp_module_combo)
pactl load-module module-combine sink_name=combo slaves="$slaves" > tmp_module_combo
pacmd set-default-sink combo
fi
The script is run every 2 minutes on 2.1's user's account.
1.1, 1.3, 2.1, 3.1 are simply configured to accept network connections without authentication. We no longer use RTP sender/receiver as it is really killing all our wireless access points. Hopefully, this problem will be fixed in the future, as RTP multicasting really makes setting these sound systems easy.
No comments:
Post a Comment