mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-12 13:34:41 +08:00
23 lines
369 B
Bash
Executable File
23 lines
369 B
Bash
Executable File
#!/bin/sh
|
|
|
|
MPG123=`which mpg123`
|
|
SOX=`which sox`
|
|
HSTEST=`which hstest`
|
|
|
|
if [ -z "$HSTEST" ]
|
|
then
|
|
HSTEST="./hstest"
|
|
fi
|
|
|
|
if [ -z "$1" ] || [ -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 -w - | $HSTEST play - $BDADDR $CHANNEL
|