ESP32-audioI2S icon indicating copy to clipboard operation
ESP32-audioI2S copied to clipboard

Enhancement to get the codec

Open DrNeuroSurg opened this issue 1 year ago • 0 comments

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.

DrNeuroSurg avatar Jun 18 '24 13:06 DrNeuroSurg