https://github.com/ikjordan/picosounds loads Wav and MP3 files and then plays them out using DMA driven PWM.
However, as it appears from the code that you may be using I2S and emulating a sound chip, you may want to look in https://github.com/ikjordan/picozx81. In src/emu_sound.cpp there is code to take sound samples from an emulated sound chip and write it out over I2S or straight PWM, using DMA. The ay8910 sound chip emulation is in src/sound.c
However, as it appears from the code that you may be using I2S and emulating a sound chip, you may want to look in https://github.com/ikjordan/picozx81. In src/emu_sound.cpp there is code to take sound samples from an emulated sound chip and write it out over I2S or straight PWM, using DMA. The ay8910 sound chip emulation is in src/sound.c
Statistics: Posted by exiles — Sun Oct 20, 2024 12:55 pm