AllStarLink Audio out to built-in sound card... for off-the-shelf monitoring

Note: This only works on the ASL image. It will not work on HamVoip because HamVoip does not recognzie the Pi's built-in audio out.

Adding the following to rpt.conf will pipe audio that would go to your node radio or sound fob speaker into your Pi's built-in audio jack. Presumably, it will still also route audio to all the other places you expect... sound fob to radio, etc.

Best of all, there should be only milliseconds of delay between real-time audio and what falls out of the audio jack.

I believe this command is what repeaters use to pipe their audio to services like Broadcastify. In fact, the first commented out example does just that: uses lame to encode the audio to mp3 and pipe it into ezstream to send it to Broadcastify (when configured in allstar.xml). Or at this point, you could actually install and configure IceCast2 locally and have ezstream stream the audio to IceCast2. In that case, you will be running your own streaming server. Please note that all audio will be delayed from real-time by about 40-70 seconds. I believe this is a result of the audio transcoding to mp3.

I put the following right after the Status Reporting section and just before the [functions] stanza. Works like a charm.

; AAD Audio output (copy of?) to built-in RaspberryPi audio jack

; This encodes audo to mp3 and pipes it to ezstream to stream to Broadcastify or local IceCast2 instance
; Configure /allstar.xml according. For Broadcastify, info is on their site.
;
;outstreamcmd = /bin/sh,-c,/usr/bin/lame --preset cbr 16 -r -m m -s 8 --bitwidth 16 - - | /usr/bin/ezstream -qvc /mnt/broadcast/allstar.xml

; This should play to an USB sound card audio out jack
;
;outstreamcmd = /bin/sh,-c,/usr/bin/aplay -r 8000 -c 1 -f S16_LE -D hw:1,0,0

; This plays audio out of the built-in RaspberryPi audio jack
;
outstreamcmd = /bin/sh,-c,/usr/bin/aplay -r 8000 -c 1 -f S16_LE -D hw:0,0,0


; Amy thinking out loud experimentally... as well as making notes to herself
;
; what if we piped lame to aplay???
; but maybe there would still be latency?
; check this route if the alsa.conf output doesn't work

; -r        = assume raw pcm
; -m m      = mode mono
; -s 8      = sfreq (8/11.025/12/16/22.05/24/32/44.1/48) for raw pcm, whatever sfreq is, sample freq I think
; -bitwdith = input bit width
;
; outstreamcmd = /bin/sh,-c,play -r 32k -t raw -e s -b 16 -c 1 -V1 -
;  -b 16 = bits per sample in raw audio
;  -c 1  = channels... so here presumably mon
;  -e s  = encoding type
;  -r    = sample rate
;  -V1   = no idea
;
;outstreamcmd = /bin/sh,-c,aplay -r 8000 -t raw -b 16 -c 1 -
;