Chat freely about anything...

User avatar
By Martinus
#96084 Hi,
I've been able to play a mp3 over a PCM5102 DAC using the lib at https://github.com/earlephilhower/ESP8266Audio - works well. Should be pretty easy to play any supported format.

However I want to display VU values somewhere (whatever the output is, a LCD screen or LEDs). For this I supposed I need access to N samples and compute an average. The question is, how do I get access to the samples values ?

My code is something very close to https://github.com/earlephilhower/ESP82 ... SPIFFS.ino (I'm using LittleFS instead of SPIFFS).

Regards,
User avatar
By eriksl
#96336 I think this project uses DMA to get the data to the I2S transmitter. This make stuff a bit more complex, but it's doable because the samples are "normal" main memory so still available to software.

I believe you should locate the code where one block of samples is completely decoded (to PCM) and a linked list entry is create to add it to the DMA engine. That's where you'll find the PCM samples.