Commit Graph
5 Commits
Author SHA1 Message Date
Earle F. Philhower, III 4b2bbe7ad5 Preliminary ICY HTTP stream support
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.
2017-11-21 11:55:23 -08:00
Earle F. Philhower, III 9c3f579c96 Add buffering to MP3 streaming
The buffer class seems to work very well to avoid hiccups while
streaming from the web, so add it by default to the example to
make it easier for users to cut-n-paste and make it work.
2017-11-20 12:15:32 -08:00
Earle F. Philhower, III c669a329c4 Add double-buffer input file source
AudioFileSourceBuffer allows system RAM to be used to buffer an
input file (normally just a HTTP Stream) to help avoid hiccups.
This could also be subclassed to use an external SRAM, at some
soint.
2017-11-14 07:08:45 -08:00
Earle F. Philhower, III c5da8c3062 Add timeout and HTTP size to streamer EOF checks
HTTPStreamer assumed the server would drop the connection when no more
data was available to be transferred from the source file.
For individual files, though, the web server will send the expected length
in the headers and leave the connection open (i.e. to recycle the connection
and accelerate web browsing).  In this case, the streamer would effectively
hang waiting for more data than was being transmitted.

Now check the read data against the expected data, and also add a 0.5s
timeout no matter what to the reading.

Tested on streaming and served files, seems to work fine.
2017-10-22 10:04:19 -07:00
Earle F. Philhower, III 64ceb33a31 Add a HTTP streamer music "file" reader class
Implements a simple and stupid HTTP stream reader to allow for ShoutCast
and other MP3 radio streaming to happen.  Presently seems to stutter on
128K, 44.1KHz streams, but may be better on lower bitrates.
2017-08-14 19:47:22 -07:00