Any libraries for playing audio on esp32?

divinergregg
Posts: 2
Joined: Wed Nov 01, 2017 2:32 pm

Any libraries for playing audio on esp32?

Postby divinergregg » Wed Nov 08, 2017 11:11 pm

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.

humberry
Posts: 2
Joined: Fri Nov 10, 2017 4:44 pm

Re: Any libraries for playing audio on esp32?

Postby humberry » Sat Nov 11, 2017 6:15 pm


User avatar
iot-bits.com
Posts: 25
Joined: Wed Dec 21, 2016 6:14 am
Location: India
Contact:

Re: Any libraries for playing audio on esp32?

Postby iot-bits.com » Tue Nov 14, 2017 8:40 am

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!
- Pratik
:geek: Just another hobbyist and consultant

Who is online

Users browsing this forum: Corand and 46 guests