Search code examples
cross-platformopenal

Is OpenAL the right audio library to use for cross platform audio processing?


I am making an application that will do things like pitch shifting and time stretching to audio files, and play them back in real time. Is OpenAL the right library for this? Or is there something that could do this better, and would be easy to reuse for different platforms?


Solution

  • OpenAL can't do pitch shifting or time stretching. For that, you'll need a 3rd party library such as SoundTouch.

    As well, OpenAL doesn't support realtime audio processing. You can kind of fake it using buffer queues, but it's a bit hokey because you'd need to keep polling to see when a buffer has finished playing and then queue the next processed buffer, and you'd need to keep your buffers very small or risk laggy audio response. However, small queued buffers can potentially lead to performance, timing, and clicking issues.