Example code for playing audio on a CH32V006 using PWM and DMA.
Small speaker connected to PC3 though a large capacitor(in series), at least 10uF.
The example PCB is designed for experimentation, therefore it also includes USB, SPI-FLASH and a can use the internal OPAMP as a second order low-pass filter. All of these features are optional.

- Get everything:
git clone --recurse-submodules- Build tools:
make tools- Convert audio file to code:
./tools/wav2code beep-boop.wav > samples.h- Build and flash:
make- Run and interract with the program:
make monitorWarning
Make sure the audio file is encoded as 16-bit signed PCM, mono, and 32kHz sample rate(this can be adjusted).