-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ideal WAV format #724
Comments
Can you attach a WAV that's failing? It's probably in a non-linear PCM format or has some other quirk the parser doesn't grok. The app you're using should be immaterial for that... |
Yes, here's a bunch of files I've been testing with (got them from freesound.org). Gotcha, I'll check for the non-linear PCM format. |
The files seem fine, indicating this is an issue with your app or the SD filesystem, I think. A quick look at the hex dump of the files shows they're plain linear PCM, nothing fancy, and in a good format. I uploaded the tram9.wav from your ZIP to LittleFS (no handy boards w/SD cards wired up but it's the same code paths) and made a dumb player and it runs fine here:
I see the "WAV start" and ~5 seconds later get tehe "WAV done" printout. The error you're seeing is "cannot read WAV, invalid RIFF header" and that's saying the absolute 1st data read is not right. ESP8266Audio/src/AudioGeneratorWAV.cpp Lines 125 to 132 in b0a06ed
From my reading the ESP32S2 is little endian, like other ESP32s, so the Given that, I'd try something basic like my sketch above. Use the FileSourceSD and try your file that way. If that conks out, then I'd suggest just opening the file normally and doing a hex dump on the device to verify it's read out correctly. |
Hello,
I'm trying to play music (WAV files) using a ESP32-S2 + PCM5102A + SD Card Reader using the following code. I often get the error:
The only wav file which worked for me is the file which was included in one of the examples: test_8u_16.wav (8 bits per sample, 16Khz, Mono)-No error when playing this file.
I'm assuming I'm using incorrect kinds of WAV files. I'm only using 16-bit files, but still unable to get them to work. What settings should I use when exporting audio from Audacity? Or perhaps there's something wrong with the code?
thank you!
The text was updated successfully, but these errors were encountered: