From 52605b80cfab4519891c2363f9320d743573efd4 Mon Sep 17 00:00:00 2001 From: David Runge Date: Mon, 26 Jun 2017 14:37:41 +0200 Subject: bin/pulse2jack: Adding script to create and default JACK sink for pulse. Can also unload the modules again. --- bin/pulse2jack | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 bin/pulse2jack (limited to 'bin') diff --git a/bin/pulse2jack b/bin/pulse2jack new file mode 100755 index 0000000..73ede01 --- /dev/null +++ b/bin/pulse2jack @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +set -euo pipefail +IFS=$'\n\t' + + +function jack_module_on() +{ + echo "Enabling JACK sink and source." + /usr/bin/pacmd load-module module-jack-sink channels=2 + /usr/bin/pacmd load-module module-jack-source channels=2 + /usr/bin/pacmd set-default-sink jack_out + /usr/bin/pacmd set-default-source jack_in +} + +function jack_module_off() +{ + echo "Disabling JACK sink and source." + /usr/bin/pacmd unload-module module-jack-sink + /usr/bin/pacmd unload-module module-jack-source +} + +case "$1" in + "on") + jack_module_on + ;; + "off") + jack_module_off + ;; +esac + +exit 0 -- cgit v1.2.3-70-g09d2