Add callbacks for metadata and status reports

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.
This commit is contained in:
Earle F. Philhower, III committed 2017-12-06 21:11:23 -08:00
1 parent 1ab9348a4c
commit 9c120a777a
22 files changed
+339 -85

No files matched your search

+2
View File
@@ -45,6 +45,8 @@ class AudioFileSourceHTTPStream : public AudioFileSource
virtual uint32_t getPos() override;
bool SetReconnect(int tries, int delayms) { reconnectTries = tries; reconnectDelayMs = delayms; return true; }
enum { STATUS_HTTPFAIL=2, STATUS_DISCONNECTED, STATUS_RECONNECTING, STATUS_RECONNECTED, STATUS_NODATA };
private:
virtual uint32_t readInternal(void *data, uint32_t len, bool nonBlock);
HTTPClient http;