OpenAL


OpenAL is a cross-platform audio application programming interface. It is designed for efficient rendering of multichannel three-dimensional positional audio. Its API style and conventions deliberately resemble those of OpenGL. OpenAL is an environmental 3D audio library, which can add realism to a game by simulating attenuation, the Doppler effect, and material densities. OpenAL aimed to originally be an open standard and open-source replacement for proprietary 3D audio APIs such as DirectSound and Core Audio, though in practice has largely been implemented on various platforms as a wrapper around said proprietary APIs or as a proprietary and vendor-specific fork. While the reference implementation later became proprietary, there are open source implementations such as OpenAL Soft available.

History

OpenAL was originally developed in 2000 by Loki Software to help them in their business of porting Windows games to Linux. After the demise of Loki, the project was maintained for a time by the free software/open source community, and implemented on NVIDIA nForce sound cards and motherboards. It is now hosted by Creative Technology with on-going support from Apple, Blue Ripple Sound via their Rapture3D OpenAL Driver, and individual open-source developers.
While the OpenAL charter says that there will be an "Architecture Review Board" modeled on the OpenGL ARB, no such organization has ever been formed and the OpenAL specification is generally handled and discussed via email on its public mailing list.
Since 1.1, the implementation by Creative has turned proprietary, with the last releases in free licenses still accessible through the project's Subversion source code repository. However, OpenAL Soft is a widely used open source alternative.

API structure and functionality

The general functionality of OpenAL is encoded in source objects, audio buffers and a single listener. A source object contains a pointer to a buffer, the velocity, position and direction of the sound, and the intensity of the sound. The listener object contains the velocity, position and direction of the listener, and the general gain applied to all sound. Buffers contain audio data in PCM format, either 8- or 16-bit, in either monaural or stereo format. The rendering engine performs all necessary calculations as far as distance attenuation, Doppler effect, etc.
The net result of all of this for the end user is that in a properly written OpenAL application, sounds behave quite naturally as the user moves through the three-dimensional space of the virtual world. From a programmer's perspective, very little additional work is required to make this happen in an existing OpenGL-based 3D graphical application.
Unlike the OpenGL specification, the OpenAL specification includes two subsections of the API: the core consisting of the actual OpenAL function calls, and the ALC API which is used to manage rendering contexts, resource usage and locking in a cross platform manner. There is also an 'ALUT' library that provides higher level 'convenience' functions — exactly analogous to OpenGL's 'GLUT'.
In order to provide additional functionality in the future, OpenAL utilizes an extension mechanism. Individual vendors are thereby able to include their own extensions into distributions of OpenAL, commonly for the purpose of exposing additional functionality on their proprietary hardware. Extensions can be promoted to ARB status, indicating a standard extension which will be maintained for backwards compatibility. ARB extensions have the prospect of being added to the core API after a period of time.
For advanced digital signal processing and hardware-accelerated sound effects, the EFX or environmental audio extensions can be used.

Limitations

The single listener model in OpenAL is tailored to a single human user and is not fit for artificial intelligence or robotic simulations or multiple human participants as in collaborative musical performances.
In these cases a multiple listener model is required. OpenAL also fails to take into account sound propagation delays. The distance to a sound source only translates into an amplitude effect and not a delay. Hence OpenAL cannot be used for time difference of arrival calculations unless that functionality is added in separately.
In order to take full speed advantage of OpenAL, a vendor/hardware specific implementation is needed and these are seldom released as open source. Many supported platforms in fact implement OpenAL as a wrapper which simply translates calls to the platform's native, and often proprietary, audio API. On Windows, if a vendor specific implementation is not detected it will fall back to the wrap_oal.dll wrapper library that translates OpenAL into DirectSound or DirectSound3D ; the removal of the latter from Windows Vista onward has effectively broken generic hardware acceleration on modern versions of Windows.

Supported platforms

The API is available on the following platforms and Operating systems: Android, AmigaOS 3.x and 4.x, Bada, BlackBerry 10, BlackBerry PlayBook, BSD, iOS, IRIX, Linux, Mac OS 8, Mac OS 9 and Mac OS X, Microsoft Windows, MorphOS, OpenBSD, Solaris, QNX, and AROS.
Supported gaming devices are for instance: GameCube, PlayStation 2, PlayStation 3, Xbox, Xbox 360, Wii, and PlayStation Portable.

Applications

Games

The following video games are known to use OpenAL:
;OpenAL SI: The OpenAL Sample Implementation is the original implementation, from Loki, and is not currently maintained.
;OpenAL Soft: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation. The library is meant as a compatible update/replacement to the deprecated OpenAL Sample Implementation, as well as a free alternative to the now-proprietary OpenAL. OpenAL Soft supports mono, stereo, 4-channel, 5.1, 6.1, 7.1 and HRTF output.
;AeonWave-OpenAL: AeonWave-OpenAL is an LGPL-licensed OpenAL emulation layer that takes advantage of the hardware acceleration provided by the non-free but low cost AeonWave 4D-audio library for Linux and Windows made by Adalin B.V.. The author claims that AeonWave-OpenAL implementation renders 3D audio five to seven times faster than either OpenAL SI or OpenAL Soft under the same conditions. By using the AeonWave library this implementation supports HRTF as well as spatialised surround sound for up to eight speakers.
;Rapture3D OpenAL Driver: The Rapture3D OpenAL Driver is a non-free, commercial, Windows only, software implementation made by Blue Ripple Sound. The library is intended as a high performance drop-in replacement for other implementations. It features: