[ESP32] Example for ESP-IDF playing a raw WAV from source via PCM5102?

poiasd
Posts: 1
Joined: Fri Apr 21, 2023 4:36 am

[ESP32] Example for ESP-IDF playing a raw WAV from source via PCM5102?

Postby poiasd » Fri Apr 21, 2023 4:46 am

Hi guys, I have an ESP32-C3, and a PCM5102. I am trying to experiment, and want to play a small song (clip) in WAV format, via earphones connected to PCM5102.

I've been looking around, and found some examples via Arduino & the ESP8266 library which worked. However, I wanted to try and do it with esp-idf directly, using i2s.

Are there an examples or references I could take a look at?

For simplicity, I would just store the 15 secs WAV file in the source code. I am not sure how things such as the sampling rate, bits etc, of WAV affect the I2S behavior, and how I should write to the I2S pin.

Thanks


Who is online

Users browsing this forum: 137502805@qq.com and 104 guests