Skip to content

Instantly share code, notes, and snippets.

@c5e3
Created May 12, 2017 07:25
Show Gist options
  • Save c5e3/79a9067fcb0c82043135915bc55b67d8 to your computer and use it in GitHub Desktop.
Save c5e3/79a9067fcb0c82043135915bc55b67d8 to your computer and use it in GitHub Desktop.
#!/bin/bash
cd ~/PATH/TO/DSDPLUS/
id=$(pactl list sink-inputs | grep -e 'application.name = "GQRX"' -e 'Sink Input #' | grep 'application.name = "GQRX"' -B1 | head -n1 | sed -e 's/Sink Input #//g')
unmute(){
pactl set-sink-input-mute $id 0
pactl unload-module $TMP
}
trap "unmute" INT
echo "Exit with CTRL-C
"
if [[ $(pactl list sources | grep -q virtual; echo $?) -ne 0 ]]; then
TMP=$(pactl load-module module-null-sink sink_name=Virtual1 sink_properties=device.description="virtual")
fi
pactl set-sink-input-mute $id 1
nc -l -u 7355 | aplay -q -c1 -r48000 -fS16_LE &
wine DSDPlus.exe -O NUL
trap SIGINT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment