Contents:
OpenAL Soft is a cross-platform software implementation of the OpenAL 3D audio API. It's built off of the open-sourced Windows version available originally from the SVN repository at openal.org.
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, low-pass filters, and reverb, are available through the EFX extension. It also facilitates streaming audio, multi-channel buffers, and audio capture.
This library is meant as a compatible update/replacement to the OpenAL Sample Implementation (the SI). The SI has been unmaintained for quite a while, and would require a lot of work to clean up. After attempting to work on the SI for a bit, I became overwhelmed with the amount of work needed, and I eventually decided to fork the old Windows version to attempt an accelerated ALSA version. The accelerated ALSA idea quickly fell through, but I ended up porting the software mixing code to be cross-platform, with multiple output backends: ALSA, OSS, DirectSound, and a .wav writer are currently implemented.
OpenAL Soft supports mono, stereo, 4-channel, 5.1, 6.1, and 7.1 output, as opposed to the SI's 4-channel max (though it did have some provisions for 6 channel, this was not 5.1, and was seemingly a "late" addition). OpenAL Soft does not support the Vorbis and MP3 extensions, however those were considered deprecated even in the SI. It does, though, support some of the newer extensions like AL_EXT_FLOAT32 and AL_EXT_MCFORMATS for multi-channel and floating-point formats, as well as ALC_EXT_EFX for environmental audio effects, and others.
The changes from 1.3 include:
Building OpenAL Soft needs CMake version 2.4 or newer (older versions may possibly work as well, but are untested). Autotools is not supported. It should build on most compilers.
The latest release is 1.4.272, and is available in source form. Please try it out and let me know how it works. :-)
openal-soft-1.4.272.tar.bz2
A more up-to-date GIT repository is available at repo.or.cz. You can get it by running:
git clone git://repo.or.cz/openal-soft.git openal-soft
Note that you need to install GIT to download it.
Older releases can be found here.
To install OpenAL Soft, first extract it. It will automatically extract itself into the openal-soft-<version>/ directory. Using your favorite shell, go into the CMakeConf/ directory, and run:
cmake ..
Assuming configuration went well, you can then build it, typically using GNU Make (KDevelop, MSVC, and others are possible depending on your system setup and CMake configuration).
Tutorial 1 - Here is a tutorial for how to use mplayer to decode compressed formats in real-time for use in your OpenAL program.
alFFmpeg - Here is some portable code showing how you can stream from FFmpeg-compatible files (ie. from compressed formats like Vorbis, FLAC, MP3, and others). It also shows how to accurately measure time from an OpenAL stream, and features gapless playback. Requires ALUT and FFmpeg.
Click here to go back.