Created
May 18, 2017 08:46
-
-
Save iamc/22ec9d65d020c7e09e8abf2d9e210de1 to your computer and use it in GitHub Desktop.
script to enable/disable pulseaudio loopback module in order to get eg. mic feedback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Loads / unloads pulseaudio loopback module in order to eg. be redirect | |
# mic input to headphones. | |
# | |
# Usage: mic-loopback [on|off] | |
# | |
if [ $# -ne 1 ]; then | |
echo "Usage: $0 [on|off]" | |
exit 1 | |
fi | |
if [[ $1 == "on" ]]; then | |
pactl load-module module-loopback latency_msec=1 | |
echo "pulseaudio loopback module loaded" | |
elif [[ $1 == "off" ]]; then | |
pactl unload-module module-loopback | |
echo "pulseaudio loopback module unloaded" | |
else | |
echo "Usage: $0 [on|off]" | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment