Page 1 of 1

Any libraries for playing audio on esp32?

Posted: Wed Nov 08, 2017 11:11 pm
by divinergregg
I tried the tmrpcm library since it had a key feature: playing multiple concurrent wav files. But it didn't compile with issues related to timers.

C:\Users\Owner\Documents\Arduino\libraries\TMRpcm-master\TMRpcm.cpp:104:31: error: 'TCCR1A' was not declared in this scope
volatile byte *TCCRnA[] = {&TCCR1A};
C:\Users\Owner\Documents\Arduino\libraries\TMRpcm-master\TMRpcm.cpp:105:31: error: 'TCCR1B' was not declared in this scope
volatile byte *TCCRnB[] = {&TCCR1B};

I searched around and so far it looks like the programmer has to write their own use of timers and buffers. I found various posts on this site with some examples. I am looking for something simple

player.play("soundeffectCrash.wav", 30); //start playing at 30seconds

-----------------------
I can use the dfplayer Mini board and library but I'm not sure this will have the flexibility of playing two concurrent files (mono).

This video from pcbreflux shows that it works
https://www.youtube.com/watch?v=kq2RLz65_w0

Any suggestions would be welcome without any extensive programming.

Re: Any libraries for playing audio on esp32?

Posted: Sat Nov 11, 2017 6:15 pm
by humberry

Re: Any libraries for playing audio on esp32?

Posted: Tue Nov 14, 2017 8:40 am
by iot-bits.com
If you use an external codec and I2S interface, we may have a good open source solution for you:
https://github.com/IoTBits/ESP32_SGTL5000_driver/

Still working on it, would love to include features if you would suggest some!