Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 27 lines (18 sloc) 513 Bytes
#!/usr/bin/env zsh
## Copyright © 2011 by Daniel Friesel <derf@finalrewind.org>
## License: WTFPL:
## 0. You just DO WHAT THE FUCK YOU WANT TO
setopt err_exit
if [[ -z $1 || -z $2 ]]; then
echo "Usage: $0 <btaddr> <file> [volume]" >&2
echo "volume: 0 .. 255, default 64" >&2
exit 1
fi
sox --show-progress --norm ${2} -b 8 /tmp/wiiplay.raw \
channels 1 rate 2000 vol 0.5
./wiispkr ${1} ${3} < /tmp/wiiplay.raw 2> /dev/null &
PID=$!
sudo renice -10 $PID
trap 'kill $PID' INT
wait
rm /tmp/wiiplay.raw