summaryrefslogtreecommitdiffstats
path: root/test/hsplay
blob: 8a676459432b988f350b31ae619571ce0c1613f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

MPG123=`which mpg123`
SOX=`which sox`
HSTEST=`which hstest`

if [ -z "$HSTEST" ]
then
	HSTEST="./hstest"
fi

if [ -z "$1" -o -z "$2" ]
then
	echo -e "Usage:\n\thsplay <file> <bdaddr> [channel]"
	exit
fi

FILE=$1
BDADDR=$2
CHANNEL=$3

$MPG123 -q -s "$FILE" | $SOX -t raw -r 44100 -c 2 -s -w - -t raw -r 8000 -c 1 -s -b - | $HSTEST play - $BDADDR $CHANNEL