Page 1 of 1
Can ESP32 S2 run as a wifi webserver and play mp3 audio at the same time?
Posted: Wed Apr 20, 2022 5:12 am
by felixcollins
We are currently using ESP32 WROOMD module. Our application plays mp3 from sd card and serves a web page over wifi simultaneously. esp32 is obviously dual core and S2 is single core. Can the S2 perform this same amazing feat? The reason I ask, is that we would love to have the S2's native USB support to implement Mass Storage Device on the ESP (not simultaneously though!).
Re: Can ESP32 S2 run as a wifi webserver and play mp3 audio at the same time?
Posted: Wed Apr 20, 2022 6:46 am
by ESP_Sprite
In theory, yes. There's a RTOS running in ESP-IDF that'll happily run multiple threads at once.
Re: Can ESP32 S2 run as a wifi webserver and play mp3 audio at the same time?
Posted: Tue May 10, 2022 1:56 am
by felixcollins
Yes, I'm well aware of that. What I was getting at was the capacity of the processor to run these two fairly demanding realtime processes at the same time. If it is too slow responding to wifi traffic the connection will drop, if it is too slow filling an audio buffer the audio will glitch. Has anyone tried this on the S2?
Re: Can ESP32 S2 run as a wifi webserver and play mp3 audio at the same time?
Posted: Mon Jul 25, 2022 3:34 pm
by johboh
Yes this is possible. I'm using ESP-ADF on a ESP32-S2 to stream music from an remote HTTPS server, decrypt it, OGG decode it and then feeding it to the DAC, at the same time as there is a web-server running, another websocket connection open as well as continuous separate HTTPS calls happening (for reporting).
The thing to think about is to make sure any thread associated with the audio have higher priority then less important tasks.
Re: Can ESP32 S2 run as a wifi webserver and play mp3 audio at the same time?
Posted: Fri Jul 29, 2022 2:19 am
by felixcollins
Thanks johboh!