Skip to content

Instantly share code, notes, and snippets.

@infoslack
Created September 11, 2014 05:01
Show Gist options
  • Select an option

  • Save infoslack/c4796a56f081e2f57230 to your computer and use it in GitHub Desktop.

Select an option

Save infoslack/c4796a56f081e2f57230 to your computer and use it in GitHub Desktop.
Loop for jack audio
#!/bin/sh
#
# script loop2jack, located in /usr/local/bin
#
# Start jack if it is not already running:
/usr/bin/jack_control start
# loop client creation
/usr/bin/alsa_out -j ploop -dploop -q 1 2>&1 1> /dev/null &
/usr/bin/alsa_in -j cloop -dcloop -q 1 2>&1 1> /dev/null &
# give it some time before connecting to system ports
sleep 1
# cloop ports -> jack output ports
/usr/bin/jack_connect cloop:capture_1 system:playback_1
/usr/bin/jack_connect cloop:capture_2 system:playback_2
# system microphone to "ploop" ports
/usr/bin/jack_connect system:capture_1 ploop:playback_1
/usr/bin/jack_connect system:capture_2 ploop:playback_2
# done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment