commit 7fcf965d3c3bb482d15ce435168d1c08cf390610 parent 559e34105e48bafac784a60fd111d191d26dc1c1 Author: Jake Koroman <jakekoroman@gmail.com> Date: Mon, 19 Feb 2024 13:51:26 -0500 audio_loopback script to toggle a pulseaudio src to sink loopback Diffstat:
A | scripts/audio_loopback | | | 15 | +++++++++++++++ |
1 file changed, 15 insertions(+), 0 deletions(-)
diff --git a/scripts/audio_loopback b/scripts/audio_loopback @@ -0,0 +1,15 @@ +#!/bin/sh + +src="alsa_input.pci-0000_00_1f.3.analog-stereo" +sink="alsa_output.usb-Kingston_HyperX_Virtual_Surround_Sound_00000000-00.analog-stereo" +tmpfile="/tmp/audio_loopback" + +if test ! -e $tmpfile; then + pactl load-module module-loopback source=$src sink=$sink > $tmpfile + echo "started loopback" + exit +else + pactl unload-module $(cat $tmpfile) + rm $tmpfile + echo "stopped loopback" +fi