Commit Graph
10 Commits
Author SHA1 Message Date
Earle F. Philhower, III dd8ac07e4e Remove ID3 signedness warning 2020-12-08 10:29:35 -08:00
Pierre-Loup MandPierre-Loup Martin 2dc245ff2e Fix tags framesize endless loop, add add'l tag support (#336)
* Modified AudioFileSourceFS.h to add resolution operator on items defined into the fs namespace in esp32 libraries.

* Added track, set, popularimeter, compilation tags.
Changed framesize loop with 32bit counter to avoid endless loops for large frames (like APIC).

Co-authored-by: Pierre-Loup Martin <lelabodutroisieme@gmail.com>
2020-11-16 10:02:57 -08:00
Earle F. Philhower, III c0ec26169c Fix buffer overflow in ID3 decode
When the ID3 tag had >64 bytes of data for an element, there was a
1-byte out of bounds access, causing a crash at some later point in
time.  Properly limit writes to the ID3 field buffer.

Fixes #104
2018-07-11 16:03:39 -07:00
Earle F. Philhower, III 01d9daeb12 Fix ID3v2 decoding, avoid infinite loop
The ID3 reader was incorrectly skipping extended headers and was
cutting off the last 10 bytes of the last ID3 entry. Correct per
http://id3.org specs.

Fixes #41
2018-02-14 20:02:41 -08:00
Earle F. Philhower, III a359222eae Fix double close in ID3 routine, add buff to tests 2018-01-20 09:24:10 -08:00
Earle F. Philhower, III e4c1c8fc66 Fix ID3V2.2 decoding, non-unsync handling
Add handing of ID3V2.2.x (tested) and (I think) V2.3.x, and fix the
unsync handling.

Issue 23 found a problem where ID3V2.2 headers, which are very different
from v2.3 and v2.4, caused crashes.  Fixing that showed another bug where
the unsyunc flag was not honored and all data was assumed to be unsync'd
causing improper reads of ID3 tags in some circumstances.
2017-12-22 20:20:46 -08:00
Earle F. Philhower, III 8e94702468 Replace Stream with simple string in MD callback
@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.
2017-12-15 12:54:49 -08:00
Earle F. Philhower, III 9c120a777a 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.
2017-12-06 21:11:23 -08:00
Earle F. Philhower, III 3226d6ec0a Add metadta callback for Icy streams
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.
2017-12-04 12:45:16 -08:00
Earle F. Philhower, III 75268b5e3b Add inline ID3 decoder w/callback interface
ID3 tags can now automatically give your app a callback with different tag
types without any additional work on your application.  See the PlayMP3 example
for a very simple example of AudioFileSourceID3's use.
2017-12-02 13:01:46 -08:00