OpenAL
   HOME

TheInfoList



OR:

OpenAL (Open Audio Library) is a
cross-platform Within computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several Computing platform, computing platforms. Some ...
audio
application programming interface An application programming interface (API) is a connection between computers or between computer programs. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standard that des ...
(API). It is designed for efficient rendering of multichannel three-dimensional positional audio. Its API style and conventions deliberately resemble those of
OpenGL OpenGL (Open Graphics Library) is a Language-independent specification, cross-language, cross-platform application programming interface (API) for rendering 2D computer graphics, 2D and 3D computer graphics, 3D vector graphics. The API is typic ...
. OpenAL is an environmental
3D audio 3D audio effects are a group of sound effects that manipulate the sound produced by Stereophonic sound, stereo speakers, Surround sound, surround-sound speakers, speaker-arrays, or headphones. This frequently involves the virtual placement of sou ...
library, which can add realism to a game by simulating
attenuation In physics, attenuation (in some contexts, extinction) is the gradual loss of flux intensity through a Transmission medium, medium. For instance, dark glasses attenuate sunlight, lead attenuates X-rays, and water and air attenuate both light and ...
(degradation of sound over distance), the
Doppler effect The Doppler effect (also Doppler shift) is the change in the frequency of a wave in relation to an observer who is moving relative to the source of the wave. The ''Doppler effect'' is named after the physicist Christian Doppler, who described ...
(change in frequency as a result of motion), and material densities. OpenAL aimed to originally be an
open standard An open standard is a standard that is openly accessible and usable by anyone. It is also a common prerequisite that open standards use an open license that provides for extensibility. Typically, anybody can participate in their development due to ...
and
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
replacement for proprietary (and generally incompatible with one another) 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 In the software development process, a reference implementation (or, less frequently, sample implementation or model implementation) is a program that implements all requirements from a corresponding specification. The reference implementation ...
later became proprietary and unmaintained, there are open source implementations such as OpenAL Soft available.


History

OpenAL was originally developed in 2000 by
Loki Software Loki Software, Inc. (Loki Entertainment) was an American video game developer based in Tustin, California, that porting, ported several video games from Microsoft Windows to Linux. It took its name from the Norse deity Loki. Although successful ...
to help them in their business of
porting In software engineering, porting is the process of adapting software for the purpose of achieving some form of execution in a computing environment that is different from the one that a given program (meant for such execution) was originally desig ...
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
games to
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
. After the demise of Loki, the project was maintained for a time by the
free software Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
/ open source community, and implemented on
NVIDIA Nvidia Corporation ( ) is an American multinational corporation and technology company headquartered in Santa Clara, California, and incorporated in Delaware. Founded in 1993 by Jensen Huang (president and CEO), Chris Malachowsky, and Curti ...
nForce sound cards and motherboards. It was hosted (and largely developed) by
Creative Technology Creative Technology Ltd., or Creative Labs Pte Ltd., is a Singaporean multinational electronics company mainly dealing with Audio equipment, audio technologies and products such as speakers, headphones, sound cards and other digital media. Foun ...
until circa 2012. Since 1.1 (2009), the sample implementation by Creative has turned proprietary, with the last releases in free licenses still accessible through the project's
Subversion Subversion () refers to a process by which the values and principles of a system in place are contradicted or reversed in an attempt to sabotage the established social order and its structures of Power (philosophy), power, authority, tradition, h ...
source code repository. However, OpenAL Soft is a widely used open source alternative and remains actively maintained and extended. While the OpenAL charter says that there will be an "Architecture Review Board" (ARB) 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. The original mailing list, openal-devel hosted by Creative, ran from March 2003 to circa August 2012. Ryan C. Gordon, a Loki veteran who went on to develop Simple DirectMedia Layer, started a new mailing list and website at OpenAL.org in January 2014. As of February 2023, the list remains in use.


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 16-bit microcomputers are microcomputers that use 16-bit microprocessors. A 16-bit register can store 216 different values. The range of integer values that can be stored in 16 bits depends on the integer representation used. With the two ...
, in either
monaural Monaural sound or monophonic sound (often shortened to mono) is sound intended to be heard as if it were emanating from one position. This contrasts with stereophonic sound or ''stereo'', which uses two separate audio channels to reproduce so ...
or
stereo Stereophonic sound, commonly shortened to stereo, is a method of sound reproduction that recreates a multi-directional, 3-dimensional audible perspective. This is usually achieved by using two independent audio channels through a configurat ...
format. The rendering engine performs all necessary calculations for distance attenuation,
Doppler effect The Doppler effect (also Doppler shift) is the change in the frequency of a wave in relation to an observer who is moving relative to the source of the wave. The ''Doppler effect'' is named after the physicist Christian Doppler, who described ...
, 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 An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
: the core consisting of the actual OpenAL function calls, and the ALC (Audio Library Context) API which is used to manage rendering contexts, resource usage and locking in a cross platform manner. There is also an 'ALUT' (Audio Library Utility Toolkit) 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 (Architecture Review Board) 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 (Effects Extension) or environmental audio extensions (EAX) 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
speed of sound The speed of sound is the distance travelled per unit of time by a sound wave as it propagates through an elasticity (solid mechanics), elastic medium. More simply, the speed of sound is how fast vibrations travel. At , the speed of sound in a ...
is used for the
Doppler effect The Doppler effect (also Doppler shift) is the change in the frequency of a wave in relation to an observer who is moving relative to the source of the wave. The ''Doppler effect'' is named after the physicist Christian Doppler, who described ...
only). The distance to a sound source only translates into an amplitude effect (attenuation) 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 (Generic Software) or DirectSound3D (Generic Hardware); the removal of the latter from
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, released five years earlier, which was then the longest time span between successive releases of Microsoft W ...
onward has effectively broken generic hardware acceleration on modern versions of Windows.


Supported platforms

The API is available on the following platforms and
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
s: Android (supports OpenSL ES),
AmigaOS AmigaOS is a family of proprietary native operating systems of the Amiga and AmigaOne personal computers. It was developed first by Commodore International and introduced with the launch of the first Amiga, the Amiga 1000, in 1985. Early versions ...
3.x and 4.x, Bada,
BlackBerry 10 BlackBerry 10 (BB10) is a proprietary mobile operating system for the BlackBerry line of smartphones, both developed by BlackBerry Limited (formerly known as Research In Motion). Released in January 2013, BlackBerry 10 is a complete rework from t ...
,
BlackBerry PlayBook The BlackBerry PlayBook is a mini tablet computer that was developed by BlackBerry. It was manufactured by Quanta Computer, an original design manufacturer (ODM).
,
BSD The Berkeley Software Distribution (BSD), also known as Berkeley Unix or BSD Unix, is a discontinued Unix operating system developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Berkeley, beginni ...
,
iOS Ios, Io or Nio (, ; ; locally Nios, Νιός) is a Greek island in the Cyclades group in the Aegean Sea. Ios is a hilly island with cliffs down to the sea on most sides. It is situated halfway between Naxos and Santorini. It is about long an ...
(supports Core Audio),
IRIX IRIX (, ) is a discontinued operating system developed by Silicon Graphics (SGI) to run on the company's proprietary MIPS architecture, MIPS workstations and servers. It is based on UNIX System V with Berkeley Software Distribution, BSD extensio ...
,
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
(supports ALSA, OSS, PortAudio and PulseAudio),
Mac OS 8 Mac OS 8 is the eighth major release of the classic Mac OS operating system for Macintosh computers, released by Apple Computer on July 26, 1997. It includes the largest overhaul of the classic Mac OS experience since the release of System 7 ...
,
Mac OS 9 Mac OS 9 is the ninth and final major release of the classic Mac OS operating system for Macintosh computers, made by Apple Computer. Introduced on October 23, 1999, it was promoted by Apple as "The Best Internet Operating System Ever", highlight ...
and
Mac OS X macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
( Core Audio),
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
(supports DirectSound, Windows Multimedia API and Windows Multimedia Device (MMDevice) API),
MorphOS MorphOS is an AmigaOS-like operating system designed for Power and PowerPC based computers. The core, based on the Quark microkernel, is proprietary, although several libraries and other parts are open source, such as the Ambient desktop. The p ...
,
OpenBSD OpenBSD is a security-focused operating system, security-focused, free software, Unix-like operating system based on the Berkeley Software Distribution (BSD). Theo de Raadt created OpenBSD in 1995 by fork (software development), forking NetBSD ...
, Solaris, QNX, and AROS. Supported gaming devices are for instance:
GameCube The is a PowerPC-based home video game console developed and marketed by Nintendo. It was released in Japan on September 14, 2001, in North America on November 18, 2001, in Europe on May 3, 2002, and in Australia on May 17, 2002. It is the suc ...
,
PlayStation 2 The PlayStation 2 (PS2) is a home video game console developed and marketed by Sony Interactive Entertainment, Sony Computer Entertainment. It was first released in Japan on 4 March 2000, in North America on 26 October, in Europe on 24 Novembe ...
,
PlayStation 3 The PlayStation 3 (PS3) is a home video game console developed and marketed by Sony Computer Entertainment (SCE). It is the successor to the PlayStation 2, and both are part of the PlayStation brand of consoles. The PS3 was first released on ...
,
Xbox Xbox is a video gaming brand that consists of four main home video game console lines, as well as application software, applications (games), the streaming media, streaming service Xbox Cloud Gaming, and online services such as the Xbox networ ...
,
Xbox 360 The Xbox 360 is a home video game console developed by Microsoft. As the successor to the Xbox (console), original Xbox, it is the second console in the Xbox#Consoles, Xbox series. It was officially unveiled on MTV on May 12, 2005, with detail ...
, Wii, and
PlayStation Portable The PlayStation Portable (PSP) is a handheld game console developed and marketed by Sony Interactive Entertainment, Sony Computer Entertainment. It was first released in Japan on December 12, 2004, in North America on March 24, 2005, and in PA ...
.


Applications


Games

The following video games are known to use OpenAL: * '' 0 A.D.'' * '' Alpha Protocol'' * '' America's Army: Operations'' *'' American Truck Simulator'' *'' Amnesia: The Dark Descent'' *'' Armed Assault'' *'' Baldur's Gate: Enhanced Edition'' *'' Battlefield 2'' *'' Battlefield 2142'' *'' BioShock'' *'' Bit.Trip'' *'' Colin McRae: DiRT'' *''
Doom 3 ''Doom 3'' is a 2004 first-person shooter, first-person shooter game developed by id Software and published by Activision. ''Doom 3'' was originally released for Microsoft Windows on August 3, 2004, adapted for Linux later that year, and Vide ...
'' *'' Euro Truck Simulator 2'' *'' FlightGear'' *'' ioquake3'' *'' Jedi Knight II: Jedi Outcast'' *'' Jedi Knight: Jedi Academy'' *''
Mari0 ''Mari0'' (pronounced "mari-zero" or "mari-oh") is a 2012 side-scrolling platform video game developed by German indie developer Maurice Guégan with creative input from Sašo Smolej and released onto their website Stabyourself.net. It combines g ...
'' *'' Mass Effect (video game)'' *''
Minecraft ''Minecraft'' is a 2011 sandbox game developed and published by the Swedish video game developer Mojang Studios. Originally created by Markus Persson, Markus "Notch" Persson using the Java (programming language), Java programming language, the ...
'' (through LWJGL) *'' OpenArena'' *'' Penumbra: Overture'' *'' Postal 2'' *''
Prey Predation is a biological interaction in which one organism, the predator, kills and eats another organism, its prey. It is one of a family of common feeding behaviours that includes parasitism and micropredation (which usually do not ki ...
'' *''
Psychonauts ''Psychonauts'' is a 2005 platformer, platform game developed by Double Fine Productions and published by Majesco Entertainment for Microsoft Windows, Xbox (console), Xbox and PlayStation 2. Set in a Retrofuturism, retro-futuristic version of t ...
'' *'' Quake 4'' *'' Race Driver: Grid'' *'' Regnum Online'' *'' Running With Rifles'' *'' S.T.A.L.K.E.R.'' *'' System Shock 2'' *'' The Dark Mod'' *'' Tremulous'' *'' Unreal II: The Awakening'' *'' Unreal Tournament 2003'' *'' Unreal Tournament 2004'' *'' Unreal Tournament 3'' *'' War§ow'' *'' Wurm Online''


Other applications

* Blender – 3D modelling and rendering tool uses OpenAL for its built-in game engine * 3DMark06 – Gamer's benchmarking tool * Dolphin (emulator) – GameCube and Wii emulator *Vanda Engine – uses OpenAL 1.1 to simulate 2D and 3D sounds *
Croquet Project The Croquet Project is a software project that was intended to promote the continued development of the Croquet open-source software, open-source software development kit to create and deliver collaborative multi-user online application software ...
* Bino - Video player software that has support for stereoscopic 3D video and multi-display video


Implementations

;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 free compatible update/replacement to the now-deprecated and proprietary OpenAL Sample Implementation. OpenAL Soft supports mono, stereo (including HRTF and UHJ), 4-channel, 5.1, 6.1, 7.1, and B-Format output. Ambisonic assets are supported. ;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 (on an AMD Athlon 64 X2) to seven (on an Intel Atom N270) 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: :* 32bit floating point audio path. :* High quality sample rate conversion (used for various purposes including Doppler shift). :* High quality effects and filters. :* Support for multi-channel sound sources (including assets encoded using
Ambisonics Ambisonics is a ''full-sphere'' surround sound format: in addition to the horizontal plane, it covers sound sources above and below the listener. Unlike some other multichannel surround formats, its transmission channels do not carry speaker ...
). :* The only limit on the number of sources or effects is CPU power, can render hundreds of sound sources and multiple effects on relatively old hardware. :* Higher-order Ambisonics (HOA) bus running at up to fourth order. ;Apple OpenAL :Apple ships an implementation of OpenAL in macOS and iOS. It is a very thin layer over the 3D Mixer (kAudioUnitSubType_3DMixer) feature in the operating system. This implementation was originally written by Ryan C. Gordon for Altivec Mac OS X systems. ;MojoAL :Tiny (single-file), full OpenAL 1.1 implementation built on top of SDL2 by Ryan C. Gordon.


See also

*
OpenCL OpenCL (Open Computing Language) is a software framework, framework for writing programs that execute across heterogeneous computing, heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), di ...
* OpenML * OpenMAX AL * FMOD * Java OpenAL * irrKlang * Lightweight Java Game Library * Web Audio – defines an API similar in some ways to OpenAL


References


External links


OpenAL official website
Implementations:
OpenAL Soft



Rapture3D
advanced OpenAL 1.1 driver Developer resources:
DevMaster.net OpenAL Tutorials
(Note: these tutorials are showing their age slightly by, for instance, using deprecated functions such as alutLoadWAVFile)
OpenAL extension repository
(maintained by Raulshc as of 2023; with table of supported extensions per implementation)
OpenAL package
in Conan, a C++ package manager {{Creative Technology Application programming interfaces Audio libraries Computer libraries Cross-platform software Formerly open-source or free software Linux APIs Video game engines