ESP32-audioI2S
ESP32-audioI2S copied to clipboard
PSRAM leakage?
Hi!
I think that something is not ok here. When song ends or is rewinded to next my free PSRAM lowers. I've left my player overnight and result is recorded in attached txt file.
I can not provide at the moment right software version, since it was modified since then. But I'll try to give You some useful informations. I'm using platformio:
platformio.ini.txt UAP_PinDef.inch.txt UAP_SdArrays.inc.txt UAP_DBG.inc.txt main.cpp.txt UAP_CoreLoop.inc.txt
Can we delete those files after solving/nofix this problem?
Is there anything wrong in my source or this is a bug? Sorry for the mess in source.
All my audio files are full-albums flac.
Best regards!
The memory leak will have existed for a long time, the samplesBuffer was not released correctly. Thanks for the tip.
Can You provide some workaround? I.e. what should I do if PSRAM gets too low to play another song?
if(ESP.getFreePsram() < 32*1024){
//do something smart here...
}
Currently I'm rebooting ESP when I realise there is PSRAM shortage.
The loss was about 64KB at each initialisation of the FLAC decoder. I used ESP.getFreePsram() too to plug the leak.
but how?
@SanZamoyski he has committed a correction or i'm not understandign what you are asking for?
I have checked it. Still free PSRAM lowers each time I play next flac.
This issue is stale because it has been open for 30 days with no activity.
Updated libraries, it is in fact working now. Thanks!