Skip to content

Instantly share code, notes, and snippets.

@jarkkojs
Created December 12, 2020 21:45
Show Gist options
  • Save jarkkojs/4f8a6d41f96b73661f46abd93147b9aa to your computer and use it in GitHub Desktop.
Save jarkkojs/4f8a6d41f96b73661f46abd93147b9aa to your computer and use it in GitHub Desktop.
In JACK2, command-line is the sanest interface.
#!/bin/sh
SOUND_CARD=$1
SAMPLE_RATE=$2
FRAMES_PER_INT=$3
FRAME_SIZE=$4
# Use the ALSA backend.
jack_control ds alsa
# Enable rtprio's.
jack_control eps realtime true
# Configure the sound card.
jack_control dps device $SOUND_CARD
jack_control dps capture $SOUND_CARD
jack_control dps playback $SOUND_CARD
jack_control dps rate $SAMPLE_RATE
jack_control dps nperiods $FRAMES_PER_INT
jack_control dps period $FRAME_SIZE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment