ESP32-audioI2S
ESP32-audioI2S copied to clipboard
Not using PSRAM
I confirmed that the audio buffer is using the heap not the available PSRAM. What might be the cause of it not thinking there is PSRAM available?
I'm using the Arduino framework in Platformio on an ESP32-S3 with 2MB of PSRAM.
In Platformio.ini I have:
build_flags =
-D BOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
and in my board.json I have:
"extra_flags": [
"-DBOARD_HAS_PSRAM",
When I call this in main it returns true:
psramInit()
**Looking at your code for AudioBuffer, m_f_psram gets assigned in the AudioBuffer::init() method. Which requires m_buffSizePSRAM to be greater than zero.
if(psramInit() && m_buffSizePSRAM > 0) {
So how can setBufSize get called before the creation of the buffers on the heap if I am creating the entire object set with just:
Audio audio;
I tried the suggestions in this article and that didn't allow the PSRAM to be seen by ESP32-audioI2S.
https://thingpulse.com/esp32-how-to-use-psram/#:~:text=It%20turns%20out%20that%20we%20need%20to%20enable,to%20the%20platformio.ini%3A%20build_flags%20%3D%20-DCORE_DEBUG_LEVEL%3D5%20-DBOARD_HAS_PSRAM%20-mfix-esp32-psram-cache-issue
This issue is stale because it has been open for 30 days with no activity.