Routing sound from different cards to a single output
I have a setup where I am monitoring for silence on an incoming stream on 3 different audio cards.
When I detect silence on the master I switch to the secondary, and if I detect silence there I switch to the last card.
The way I have it set up I load/unload the loopback module for each card depending on who's the active card.
This has the inconvenience that I need a 3-to-1 minijack cable to be able to maintain the stream.
Can I load the loopback module and point the output to a single card (independently of the input card)?
How can I route the audio from any input to a single output?
Solution 1:
From version 0.9.16 pulseaudio-module-loopback accepts parameters for source and sink respectively. This would be the command line terminology:
pactl load-module module-loopback source=<name_or_index> sink=<name_or_index>
By this the input source with a given name or index will be looped to the output sink with the given name or index.
If no paramter is given this module just guesses what to loop where (usually using our default sinks/sources).
The indices of a source or a sink will be listed on pacmd list-source
resp. pacmd list-sinks
.
Alternatively we may want to move a running input stream to a given sink. See this answer for details on how to do this).