I’m new to the Arduino world, so excuse my lack of kowledge. I’m using the Wemos D1 mini (basically an esp8266) with the Arduino IDE.
For my project I’m using the very good ESP8266Audio library (GitHub - earlephilhower/ESP8266Audio: Arduino library to play MOD, WAV, FLAC, MIDI, RTTTL, MP3, and AAC files on I2S DACs or with a software emulated delta-sigma DAC on the ESP8266 and ESP32) which can stream an HTTP stream to the I2S pin of my board. Everything works fine, it’s just that I’m short of RAM. I’m already using the version of the library which use external SPIRAM and what I’d like to make is the following :
We’re already using the external RAM to buffer the MP3 and the other thing using lots of RAM is the decoding library. Searching in the examples and library, I’ve found that it declares the variables using the malloc() function.
Would it be possible to reserve the space allocated for the buffer with a malloc() function that goes in the external RAM ? (a function that would go like this : malloc(SizeOfCodec, SPIRAM).
Sorry if I’m unclear… But any help is welcome !