ESP32-audioI2S
ESP32-audioI2S copied to clipboard
Enhancement to get the codec
As we have a callback for bitrate ("void audio_bitrate(const char info)*") it would be nice to have also a callback for the codec.
e.g. void audio_codec(const char * info)
I made a small addition to Audio.h
extern __attribute__((weak)) void audio_codec(const char*);
and to Audio.cpp in "initializeDecoder"
uint32_t gfH = 0; uint32_t hWM = 0; if(audio_codec) { audio_codec(getCodecname()); }
it works and is sometimes useful.