The ICYMDReader was not properly returning the unread "'" characters
and so StreamTitles were being truncated at the first apostrophe. Fix
the unread() and read() member functions to clean up.
@armSeb found that the stream interface caused a big slowdown and
hiccups in his playback, replace the MetadataCallback's *Stream with
a simple *char for faster operation and less overhead.
All objects can have a metadata and/or status report callback once created.
They will call the source program with the parsed ID3 tag, ICY StreamTitle,
or text and numeric error ID of any interesting event. It is up to the end
application to figure out what to do with this. Normally, you'd just print
it to the LCD or Serial port. But it is possible to detect, say, a buffer
overflow and then switch to a lower bitrate stream for example.
Allow a UI to get a notification when a StreamTitle or other metadata
comes into the stream. Callback function would normally just update a
flag and let the next global event loop handle updating the display.
Wasn't incrementing the returned data pointer when we had to split the
requested read into pre- and post-ICY blocks. This resulted in errors
in the decoded stream.
Add a subclass of the HTTPStream that can extract the ICY metadata.
Needs to implement a callback function or parse it internally and expose
a class variable to let the UI see the current stream information.