How to redirect from Audio Output to Mic Input using PulseAudio?
The manuals for pactl
and pacmd
are readily available if you give it a search. I found them here:
I think you are interested in the following excerpt from the pactl
manual:
move-sink-input ID SINK : Move the specified playback stream (identified by its numerical index) to the specified sink (identified by its symbolic name or numerical index).
You should be able to use pactl list sink-inputs
, pactl list source-outputs
, pactl list sinks
, and pactl list sources
combined with some grep
and/or sed
or something of that nature to programmatically determine the correct stream and sink.