OpenALOpen Audio Library) is a cross-platform audio application programming interface (API). 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 (degradation of sound over distance), the Doppler effect (change in frequency as a result of motion), and material densities.
OpenAL aimed to originally be an open standard and open-source 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 later became proprietary and unmaintained, there are open source implementations such as OpenAL Soft available.
OpenAL was originally developed in 2000 by Loki Software to help them in their business of porting Windows games to Linux.[3] 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 was hosted (and largely developed) by Creative Technology until circa 2012.
Since 1.1 (2009), the sample implementation by Creative has turned proprietary,[citation needed] 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 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,[citation needed] 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.[4] 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.[5] As of February 2023, the list remains in use.
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 for 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.
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.
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.[6]In these cases a multiple listener model is required. OpenAL also fails to take into account sound propagation delays (the speed of sound is used for the Doppler effect 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.[7]
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 onward has effectively broken generic hardware acceleration on modern versions of Windows.[8][9]
The API is available on the following platforms and operating systems:[10] Android (supports OpenSL ES), AmigaOS 3.x and 4.x,[11] Bada, BlackBerry 10,[12] BlackBerry PlayBook, BSD, iOS (supports Core Audio), IRIX, Linux (supports ALSA, OSS, PortAudio and PulseAudio), Mac OS 8, Mac OS 9 and Mac OS X (Core Audio), Microsoft Windows (supports DirectSound, Windows Multimedia API and Windows Multimedia Device (MMDevice) API), MorphOS, OpenBSD,[13] Solaris, QNX, and AROS.[14]
It turns out that I already had the first two installed, so all I needed was libopenal1. Well, and then I had to go turn sounds on. That puzzled me for a bit- because I first ran X-Plane in no sound mode it was defaulting to sounds off.
Well, I spoke too soon. It worked once, the first time I started XP after installing libOpenAL, but now I have no sound again. I checked, and sounds are turned on in XP. The log file also mentioned that OpenAL is still being used. Ideas?
Y'know what? I got no sound for anything when I tested other things. Other games, YouTube, etc. This reminded me of something, so I looked at my sound settings in Ubuntu and for some reason the output source had changed. I flipped it back and it's all good again, now.
I've had this happen with Ubuntu in the past, on other machines- for some reason my sound settings just spontaneously change now and then. It's damned annoying. But it's fixed for now. Is this a known issue? It seems to plague me a lot. In this case Ubuntu seems to want to default to Digital Output, but I don't want to use up a USB port so I have my speakers on Line Out so that I can plug them into the analog jack.
On Ubuntu 18,04 running XP11 dvd version I simply received a notice from XP that I needed the openal lib. Once I selected vulkan I then recieved a notification that I needed a vulkan driver (turns out it's an extra which isn't included in the nvidia driver).
So, I tried installing openal via pacman using packagenames openal and lib32-openal, and neither can be found. On the packages section it says that it can be found in the extras repository, which I have enabled in my /etc/pacman.conf, so what gives? why can't it find it? am I missing something entirely? Is there a better way to install love?
If you need support, feel free to send a message to the OpenAL mailing list:
There is also an issue tracker on the GitHub repository, if you wish to report a bug or make a feature request.
You can ask for help in IRC, #openal on irc.libera.chat (see and for more information on libera.chat and connecting to it).
This library is multi-platform, with support for Linux, Windows, Android, OS X, iOS, and more. Audio backends for PipeWire, PulseAudio, ALSA, WASAPI, OpenSL, CoreAudio, OSS, JACK, DirectSound, WinMM, Solaris, SoundIO, PortAudio, SDL2, "Null" Output, and a .wav file writer are currently implemented. Loopback devices are also supported for playback to interface with other audio systems.
To install OpenAL Soft, first extract it. It will automatically extract itself into the openal-soft-1.23.1/ directory. Using your favorite shell, go into the build/ directory, and run:
cmake ..
Alternatively, you can use any available CMake front-end, like cmake-gui, ccmake, or your preferred IDE's CMake project parser.
Assuming configuration went well, you can then build it. The command
cmake --build .
will instruct CMake to build the project with the toolchain chosen during configuration (often GNU Make or NMake, although others are possible).
Update: I compiled OpenAL-Soft latest source and found the same messed up behavior when using their sample playback executable. So it seems to not be a problem with panda! stereo audio file playback does not properly match input file Issue #825 kcat/openal-soft GitHub
basic is what I want to change it to (and what I think the default should be).
Edit: Above is wrong, I was looking at latest, but Panda3D is using version 1.19.1. For this version, what we want is this config, hrtf:
You are trying to install binary package using name of its source package. They are different things. Source package has openal-soft name, during its compilation the following binary packages are produced:
I ran into this issue today, when using pipewire, JAVA will not be able to produce any sound. In order to get sound in java running I needed to install lib32-openal, create a file: /etc/openal/alsoft.conf and add the line driver=alsa. This is not an intuitive process and many less experienced users will not be able to solve this.
@pixartist Can you tell us was the issue with all sounds or perhaps just the music (I think they still use midi files in old java minecraft)? Also, can you provide some details on your hardware (sound card and are you connected via an audio jack, hdmi, or displayport)?
In any case, I want to thank you for providing a solution. Often, people come onto a site pointing out a problem, one that they fixed for themselves, but seldom follow it up with a resolve for others. - I respect that you did so.
3a8082e126