I'm working on a project that will require some system to generate low latency (0-5ms RT) audio in response to SPI inputs.
I'll want to load short sound files into RAM, then manipulate the samples before sending them out on an audio bus.
I thought this should be fairly simple using the RPi platform, but I'm yet to find a straight answer or examples of where this has been done.
I was hoping there would be a simple C++ library where I can just shove samples into a buffer at regular intervals and let the Pi and a USB audio interface do the rest, but it seems that even getting HID audio devices to work is not trivial, let alone reducing the latency to acceptable levels.
Using an SPI audio codec might be an option, but I'm not sure if the Pi would be able to meet the timing requirements, and it seems a little over-complicated since I can do this whole thing in 5 minutes on windows, albeit without the SPI input.