|
|
|
|
|
by Jasper_
3207 days ago
|
|
Don't let the name fool you. OpenAL is a closed-source library, much like Wwise or FMOD or PortAudio, that just implements playback. Bizarrely enough, it is also the only one of these APIs that uses a similar "play this buffer" approach and suffers from the same issues as Web Audio's memory management, just without a GC. The actual audio equivalent to OpenGL is OpenSL [0], which I don't think picked up any support from anybody. [0] https://www.khronos.org/opensles/ |
|
Broadly low-level audio APIs are divided into 2 categories:
1. Callback-based - every time the underlying system has a new block of audio available and/or needs to be supplied with a new block, it calls your callback, which reads input data, does whatever processing you want, and writes output data
2. Stream-based - Inputs and Outputs are represented by streams. You can read from the input stream to record and write to the output stream to play back.
Both types of API can be used for low-latency audio, but you generally introduce a buffer of latency when you need to convert between them.
Portaudio lets applications choose which API they want to use.
[0]http://www.portaudio.com/license.html