blob: 3de71b5d2a0672341e18ed9de73817928b3fb768 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/bash
#
# Read audio from ALSA input using sox, and encode with toolame,
# send to ZMQ
#
# This needs toolame-dab from
# https://github.com/Opendigitalradio/toolame-dab
#
BITRATE=$1
DST=$2
ALSASRC="default"
if [ "$DST" == "" ]
then
echo "Usage:"
echo " $0 <bitrate> <zmq destination>"
exit 1
fi
sox -t alsa $ALSASRC -b 16 -t raw - rate 48k channels 2 | \
toolame -s 48 -D 4 -b $BITRATE /dev/stdin $DST
|