aboutsummaryrefslogtreecommitdiff
path: root/.local/share/bin/nodisconnect
blob: b4fb2c37fee09c21a3dfca0516e33b18b779d02f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# use sox to play very quiet noise for keeping bluetooth headphones connected

# kill any previously running processes
killall -u "$LOGNAME" play

# arguments used:
# -q                quiet mode (don't output progress bar)
# -n                null input filename (because synth is used as input)
# -r 44100          sample rate (44.1 KHz)
# -b 32 -e signed   signed 32-bit
# -c 2              create two channels (ouput stereo)
# synth whitenoise  start with white noise
# band -n 650 1300  bandpass filter between 650-1300 Hz
# vol 0.01          very quiet
play -q -n -r 44100 -b 32 -e signed -c 2 synth whitenoise band -n 650 1300 vol 0.01 & disown