#I do this with `audiomixer` Set the
1 messages · Page 1 of 1 (latest)
Thanks @plain sapphire ! To read audio from an sd card, would you do something like this?
...... load sdcardio....
f = open("sd/cplay-5.1-16bit-16khz.wav", "rb")
wav = audiocore.WaveFile(f)
a = audiobusio.I2SOut(board.D1, board.D0, board.D9)
yep! but you may have problems. last I checked there was some issues inside CircuitPython. Here's the code i was using https://github.com/todbot/circuitpython-tricks/blob/main/larger-tricks/i2s_sdcard_pico.py
Thanks @plain sapphire what type of issues do you mean? With that code example?
some of it is documented in that code example (crashing of CirPy with continuous audio hiss), but if I recall, the main problem was lots of clicks and pops while playing. Sounded like pulling data off the SD card then feeding it to the audio system was just too slow
Are there any solutions that might correct those issues? Maybe reading into local flash from SD and then streaming? I'm using an ESP32-S2 with 4MB Flash, so could maybe split up the wav
Also, if you don't mind me asking, what audio driver IC were you using?
the example code says PCM5102
an I2S chip
yep, that standard PCM5102 moduile