1 #!/bin/sh 2 3 MPG123=`which mpg123` 4 SOX=`which sox` 5 HSTEST=`which hstest` 6 7 if [ -z "$HSTEST" ] 8 then 9 HSTEST="./hstest" 10 fi 11 12 if [ -z "$1" ] || [ -z "$2" ] 13 then 14 echo -e "Usage:\n\thsplay <file> <bdaddr> [channel]" 15 exit 16 fi 17 18 FILE=$1 19 BDADDR=$2 20 CHANNEL=$3 21 22 $MPG123 -q -s "$FILE" | $SOX -t raw -r 44100 -c 2 -s -w - -t raw -r 8000 -c 1 -s -w - | $HSTEST play - $BDADDR $CHANNEL 23