OpenAL Soft
Contents:
Overview
OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API.
OpenAL provides capabilities for playing audio in a virtual 3D environment. Distance attenuation, doppler shift, and directional sound emitters are among the features handled by the API. More advanced effects, including air absorption, occlusion, and environmental reverb, are available through the EFX extension. It also facilitates streaming audio, multi-channel buffers, and audio capture.
If you need support, feel free to send a message to the OpenAL mailing list:
https://openal.org/mailman/listinfo/openal
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 https://libera.chat/ and https://libera.chat/guides for more information on libera.chat and connecting to it).
Features
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.
OpenAL Soft supports many extensions, including but not limited to AL_EXT_MCFORMATS and AL_EXT_FLOAT32 for multi-channel and floating-point formats, AL_EXT_BFORMAT for B-Format (ambisonic) soundfield audio buffers, and ALC_EXT_EFX for environmental audio effects such as reverb, occlusion, and obstruction. It supports mono, stereo, 4-channel, 5.1, 7.1, HRTF, UHJ, and B-Format output.
OpenAL Soft 1.24.2 is now available!
The changes from 1.24.1 include:
- Implemented the AL_SOFT_bformat_hoa extension.
- Implemented default device change events for the PulseAudio backend.
- Implemented an option for WASAPI exclusive mode playback.
- Fixed reverb being too quiet for sounds from different directions.
- Fixed compiling with certain versions of Clang.
- Fixed compiling for some older macOS versions.
- Fixed building alffplay on systems without pkg-config.
- Improved output format detection for CoreAudio.
- Changed the default resampler back to Cubic Spline.
- Added an SDL3 playback backend.
Disabled by default to avoid a runtime dependency and for compatibility; a single process can't safely use SDL2 and SDL3 together on some OSs, so enable with care.
- Converted examples from SDL2 to SDL3.
- Integrated fmtlib into the main library and router for logging and string formatting.
The changes from 1.24.0 include:
- Fixed compilation on PowerPC.
- Fixed compilation on some targets that lack lock-free 64-bit atomics.
- Fixed a crash when parsing certain option values.
- Fixed applying noexcept in the public headers with MSVC.
- Fixed building for UWP with vcpkg.
- Improved compatibility when compiling as C++20 or later.
- Integrated fmtlib for some examples and utilities.
The changes from 1.23.1 include:
- Updated library codebase to C++17.
- Implemented the ALC_SOFT_system_events extension.
- Implemented the AL_EXT_debug extension.
- Implemented the AL_EXT_direct_context extension.
- Implemented speaker configuration and headphones detection on CoreAudio.
- Fixed a potential crash with some extension functions on 32-bit Windows.
- Fixed a crash that can occur when stopping playback with the Oboe backend.
- Fixed calculating the reverb room rolloff.
- Fixed EAX occlusion, obstruction, and exclusion low-pass filter strength.
- Fixed EAX distance factor calculations.
- Fixed querying AL_EFFECTSLOT_EFFECT on auxiliary effect slots.
- Fixed compilation on some macOS systems that lack libdispatch.
- Fixed compilation as a subproject with MinGW.
- Changed the context error state to be thread-local.
This is technically out of spec, but necessary to avoid race conditions with multi-threaded use.
- Split the cubic resampler into 4-point spline and gaussian variants.
The latter prioritizing the suppression of aliasing distortion and harmonics, the former not reducing high frequencies as much.
- Improved timing precision of starting delayed sources.
- Improved ring modulator quality.
- Improved performance of convolution reverb.
- Improved WASAPI device enumeration performance.
- Added UWP support.
- Added 'noexcept' to functions and function types when compiled as C++.
As a C API, OpenAL can't be expected to throw C++ exceptions, nor can it handle them if they leave a callback.
- Added an experimental config option for using WASAPI spatial audio output.
- Added enumeration support to the PortAudio backend.
- Added compatibility options to override the AL_VENDOR, AL_VERSION, and AL_RENDERER strings.
- Added an example to play LAF files.
- Disabled real-time mixing by default for PipeWire playback.
- Disabled the SndIO backend by default on non-BSD targets.
Download
Building OpenAL Soft needs CMake version 3.13 or newer (older versions may possibly work as well, but are untested). Autotools is not supported. It should build on most compilers supporting C++17.
The latest release is 1.24.2, and is available in source form.
openal-soft-1.24.2.tar.bz2
Win32 and Win64 binaries are also provided.
openal-soft-1.24.2-bin.zip
A more up-to-date Git repository is available at GitHub and repo.or.cz.
Note that you will need to install Git to download it.
Older releases can be found here, and older binaries can be found here.
Source Install
To install OpenAL Soft, first extract it. It will automatically extract itself into the openal-soft-1.24.2/ 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).
Click here to go back.