- I've got broadband connections at home and work and I listen to a lot of net radio stations.
- I've got a couple of TINI's that I'm not doing a lot with.
- Some clever people at www.mp3elf.net have made an mp3 playing system for Tini.
Rolling those three things together gives some interesting possibilities
What I'd like to do is have a Hi-Fi seperate unit that'll connect to my favourite shoutcast streams and output them to my stereo,
without the hassle and noise of a computer whiring away in the background. The MP3elf is the perfect hardware as far as I can see.
It has dedicated chips for buffering and decoding MP3 data. The responsibility of the TINI is to get that data and provide it
to the circuitry fast enough.
What I'd like to do is write some code to handle a shoutcast stream and give that data to the hardware.
I've looked at the protocol that Shoutcast clients (i.e. Winamp) use and it's pretty simple. Here's the transcript of my
local shoutcast client connecting to a stream, (philosomatika)
GET http://206.80.1.34:10128/ HTTP/1.0 Host: 206.80.1.34 User-Agent: WinampMPEG/2.7 Accept: */* Icy-MetaData:1 Connection: close ICY 200 OK icy-notice1:<BR>This stream requires <a href="http://www.winamp.com/">Winamp</a><BR> icy-notice2:SHOUTcast Distributed Network Audio Server/FreeBSD4 v1.8.3<BR> icy-name:P h i l o s o m a t i k a - 100% Psychedelic Trance icy-genre:Trance Techno Dance icy-url:http://www.philosomatika.com icy-pub:1 icy-br:128 |
I wrote a simple Java program to connect to the same stream and get the MP3 data sent out. There were a few gotchas I've not quite worked out, such as having to make 2 requests to get a stream, but I'll work these out. Here's a transcript from my program:
key red=request, blue=response.
GET / HTTP/1.0 Host: 206.80.1.34 User-Agent: WinampMPEG/2.7 Accept: */* Icy-MetaData:1 Connection: close ICY 200 OK icy-notice1: GET / HTTP/1.0
icy-name:P h i l o s o m a t i k a - 100% Psychedelic Trance
icy-genre:Trance Techno Dance
icy-url:http://www.philosomatika.com
icy-pub:1
icy-metaint:8192
icy-br:128
d-D=T0çHb?¦+V¶ônô?f¦çë)Ñw?+=QX.¦`9 Q_\ï@f\VÆR?+\òP÷?a-`çæ#pY-zT!F?)?H (í ?0+R:iE
5++;¡tçܰ+¦¦b-²ÄdZ¦]èîÑÖde1[j. ú]¦S+ôÿâ*ê=.!¬ÆG@++v¦84:?d-==+?0¦Çòf??{++)O¦·_6sv
P??·+i=æó¦??|g?%,è+½úEªl#H ?Tâ¬?-+!?çû?ò¡-+?\a¿.?:1ePOH¦t¦ùU v?-? %C â"÷VôJ
T??s¦ea¦?ĦSá?Dñï?/J?¶¯,t#ß?}¦+«3C7_¦?a¦?WC+H+-#e-?-?¬hLDt?e¦¼ :?¦âm«ï v?DÇ ??7
¦o``
H-+¡tî??HdkL?kAK?¡eé?lÜ?| ¬Ü-R?A?c æ)-¦¦+Iàmkª?-
ê«9Y+ºƒI¼C1ùS+%¦H+?B-N0¦ñ+g˜^?+«±x+¦??DgKOP[Dc-éíª¤j -r-++FG T¤Ç ¶IM-¤û
A+¦[>[ºÑ¦@Bv??&ÿ+ÜR-¦eóO¦%-a M-¦?ki?vî?uUK?/+4¶ë+)v+U¦"?¦¦+?bë
¿ÿª |