CelliesProjects / ESP32_VS1053_Stream

A streaming library for Arduino esp32 with a vs1053 mp3/aac/ogg/flac decoder. Plays http, https (insecure mode) and chunked streams and parses the metadata. Also plays ogg and mp3 from sdcard.
MIT License
50 stars 10 forks source link

Watchdog #30

Open vladkozlov69 opened 6 months ago

vladkozlov69 commented 6 months ago

Can we have a some kind of watchdog here? i.e. callback function when no data send to VS1053 for some time?

CelliesProjects commented 6 months ago

Hi @vladkozlov69 I am not sure what you mean.

vladkozlov69 commented 6 months ago

Hi @CelliesProjects

I think we can add something like this

extern void audio_stream_stats(int eventType, int value) __attribute__((weak));

and call it from these places where we have logging "spend %lu ms stuffing %i bytes in decoder", "Stream stalled for %lu ms" etc.

This way the user application will have the info about unstable connection, can feed WDT, etc.