Any libraries for playing audio on esp32?

divinergregg
Posts: 1
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

[link][http://www.linux.rk.edu.pl/w/p/odtwarzanie-danych-audio-na-mikrokontrolerach/&prev=search]

User avatar
iot-bits.com
Posts: 22
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: Maker & electronics design consultant

Who is online

Users browsing this forum: No registered users and 2 guests