How does Libretro work with audio (in combination with Allegro 5)?


#1

It’s me again.

This time, I want to understand more about how Libretro works with audio. I already read the documentation and the source file and the examples (though I had some difficulty understanding the “play a wav file” example).

I also have been looking into the Allegro 5 library these days. I have been deeply reading their documentation on the audio addon and even dove into the source code. Apparently, I have to connect audio streams and samples into a mixer that outputs a single audio buffer; the mixer works with either signed 32-bit float or signed 16-bit int (the one that Libretro uses). I ask you: how can I use Allegro 5 with Libretro when programming audio?