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

+3 -1
View File
@@ -108,7 +108,9 @@ bool AudioGeneratorAAC::loop()
int ret = AACDecode(hAACDecoder, &inBuff, &bytesLeft, outSample);
if (ret) {
// Error, skip the frame...
Serial.printf("AAC decode error %d\n", ret);
char buff[48];
sprintf(buff, "AAC decode error %d", ret);
cb.st(ret, buff);
} else {
lastFrameEnd = buffValid - bytesLeft;
AACFrameInfo fi;