
Shoutcast radio player and gui.

This is work in progress but what is there should just work.

The GUI is an intermediate step to building a piece of HIFI gear,
a raspberry pi and a dac inside a "Quad FM4" (google if you don't know),
box with a rotary encoder and a VFD display. I want a good, simple
user interface and the good quality sound (within reason).
these are my priories for the product.

The GUI (tuner) runs audio/radio which reads the playlist,
It then runs a decoder (typically  audio/adtsdec or audio/mp3dec)
to play the content. HLS streams (used by ABC in .oz or the BBC in .uk)
require an intermediate mpg2 transport stream demultiplexer
(mpgtsdec).

wavenc.c and wavinfo.c for validation of audio data on a pc/mac.

tone - a test tone generator.

to install
	mkdir /$cputype/bin/audio
	cd /sys/src/cmd/audio
	mk install
	mk nuke
	cp home_lib_radio $home/lib/radio
	audio/tuner

I have copied the mp3dec and mp3enc from /sys/src/cmd/games and renamed
them back to lame and mad (the name of their sources) and updated them
from the net.

I have made the decision that the audio stuff should live in $objtype/bin/audio:
This is music, ist not a game, its serious.

I reccomend the "Audiophile" stations as being of the highest quality.
256 to 320Kbps is what you are looking for.

some stations don't report the name of the show or the current track playing
which is a real shame. 

the BBC and live365 done't use shoutcaset metadata so I am fetching some
station specific metatdata over http. Tools that do this are in
/bin/audio/radiometa.

tuner (the GUI) needs to be rewritten using libthread but I lack experience
with this library so I wrote the code using old-skool fork() and lock()

The gui has two menus, B3 selects the station, and B2 adjusts the volume.
up and down arrows also select stations.

It doesn't remember the last used station or force an initial volume
so it may be quite loud just after a reboot.

bandwidth is reported as full (20Khz approx), half, quarter etc

bitrate is expressed as a compression ratio of bitrate:bandwidth

fakeaudio.rc can be used to debug on servers with audio output.

shout with ideas/fixes.

-Steve, 2015
