summaryrefslogtreecommitdiffstats
path: root/test/hsplay
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2002-12-21 15:40:33 +0000
committerMarcel Holtmann <marcel@holtmann.org>2002-12-21 15:40:33 +0000
commit7490b6c61bfa0b581ff7a15f6482787973cf7e3f (patch)
treeffdcc48949262bedd358df3534bc637715f162fc /test/hsplay
parent34e63ae877d59207762da9f96e414a704c825393 (diff)
Add Headset Test utility
Diffstat (limited to 'test/hsplay')
-rwxr-xr-xtest/hsplay22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/hsplay b/test/hsplay
new file mode 100755
index 00000000..8a676459
--- /dev/null
+++ b/test/hsplay
@@ -0,0 +1,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