Skip to content

Instantly share code, notes, and snippets.

@riccardobl
Created January 20, 2016 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riccardobl/2c86c84d4c84a28abc6d to your computer and use it in GitHub Desktop.
Save riccardobl/2c86c84d4c84a28abc6d to your computer and use it in GitHub Desktop.
Enable/Disable mic looback with pulseaudio
function enable {
pactl load-module module-loopback latency_msec=1 > ~/.micloopback.id
}
function disable {
pactl unload-module `cat ~/.micloopback.id`
}
if [ -f ~/.micloopback.id ]; then
disable
rm ~/.micloopback.id
fi
if [ "$1" = "on" ]; then
enable
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment