#!/usr/bin/env zsh ## Copyright © 2011 by Daniel Friesel ## License: WTFPL: ## 0. You just DO WHAT THE FUCK YOU WANT TO setopt err_exit if [[ -z $1 || -z $2 ]]; then echo "Usage: $0 [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