I'm trying to implement shoutcast decoding using MAD and I'm hitting a problem right off the bat. The first chunk of data I feed to mad_stream_buffer() results in a varying assortment of errors (returned to me via the error callback). I've used mpg321's read_from_fd() as an example, and it doesn't seem like there is any processing of the data done before the data is sent to mad_stream_buffer(). I know there are meta-data blocks in the stream, but I get these errors before I encounter the first meta-data block.
The code can be found here :
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/grrr/rrr/mad.c?rev=1.1.1.1&am...
and the relevant function is rio_mad_shoutcast_input(). Any suggesetions would be appreciated.
Thanks, Reza
p.s. I've noticed this text in a lot of headers returned from shoutcast servers :
icy-notice1:<BR>This stream requires <a href="http://www.winamp.com/">Winamp</a><BR>
but I'm guessing those notices can be ignored, right? They're not doing anything special with winamp?