Fix MetadataCallback function signatures

The MD callback now gets a string, not a stream, so update the examples
to compile properly.
This commit is contained in:
Earle F. Philhower, III committed 2017-12-15 14:58:14 -08:00
1 parent 43273e3394
commit 65a6cc4be7
2 files changed
+4 -4

No files matched your search

@@ -21,11 +21,11 @@ AudioFileSourceBuffer *buff;
AudioOutputI2SNoDAC *out;
// Called when a metadata event occurs (i.e. an ID3 tag, an ICY block, etc.
void MDCallback(void *cbData, const char *type, bool isUnicode, Stream *stream)
void MDCallback(void *cbData, const char *type, bool isUnicode, const char *string)
{
const char *ptr = reinterpret_cast<const char *>(cbData);
(void) isUnicode; // Punt this ball for now
Serial.printf("METADATA(%s) '%s' = '%s'\n", ptr, type, stream->readString().c_str());
Serial.printf("METADATA(%s) '%s' = '%s'\n", ptr, type, string);
Serial.flush();
}