Upgrading STM32Cube USB Audio Class driver – More advanced playback

I got back to the audio part of the project for a post. I heard annoying pops and crackles during the playback, and after about 3-4 seconds, a complete distorted sound. I know that I left this part unfinished before.

At last, I routed my 1&2 channels (out of 4 channels) to the audio DAC of the Discovery board with a simple software loop that splits my audio buffer into two separate buffers after the samples came in. My audio buffer stored 16 packets, which means 8ms latency and about 6KByte buffer. The original Audio Class implementation uses 80 samples, and has some other strange thing that I mentioned earlier.

Continue reading


Adding MIDI interface

The next step is to add MIDI interface. Algoriddim Djay did not recognized my device as Reloop Beatpad after cloning VID and PID. Maybe after cloning the MIDI interface it will.

I cloned the MIDI descriptor part from Beatpad. I added EP1 IN and EP2 OUT Bulk endpoints. The addresses are different from the Beatpad endpoint addresses, but as I mentioned earlier I cannot set the endpoint addresses in the FS USB core. I hope the software is not too picky about addresses.

Continue reading