Statistics
| Branch: | Tag: | Revision:

dvbd / utils / radio @ 723fa73a

History | View | Annotate | Download (495 Bytes)

1
#!/bin/bash
2

    
3
#
4
# Requires dvbtools (for ts2es) and madplay and alsa-utils (for aplay)
5
#
6

    
7
PATH=$PATH:/home/jak/bin
8

    
9
trap "" TERM
10
killav >& /dev/null
11

    
12
apid=`grep "^$1:" ~/.tzap/channels.conf | awk -F ':' '{ print $12 }'`
13

    
14
if [[ -z "$apid" ]] ; then
15
	echo "Invalid channel $1"
16
	exit 1
17
fi
18

    
19
cleanup()
20
{
21
    echo "Cleaning up..."
22
    kill %1
23
}
24
trap cleanup TERM
25
trap cleanup CHLD
26

    
27
dvbcat -p 5 dvb-t "$1" | \
28
ts2es $apid | \
29
madplay -b16 -R48000 -o raw:- - | \
30
aplay -r 48000 -f S16_LE -c 2 &
31

    
32
wait %1