Games and other applications use OpenAL, a programming library without a window of its own, to render 3D audio. Its source, listener, and buffer objects let an application place sounds in a virtual space and play them from the listener’s point of view.
Sources place sound around a listener
An OpenAL application loads audio data into buffers and attaches those buffers to sources. Each source represents a sound emitter at a position in 3D space; the listener represents the viewpoint from which the scene is heard. Moving either object changes how the audio is rendered, allowing game sounds to seem closer, farther away, or to come from a particular direction.
The API also handles distance attenuation, which changes sound level with distance, and Doppler shift, which changes perceived pitch as a source and listener move relative to each other. Those behaviors let a game tie audio cues to objects and movement in its world.
EFX adds environmental sound effects
The EFX extension adds effects such as environmental reverb, occlusion, and air absorption. A game can use these to shape a sound according to its surroundings, such as making a source sound different when heard through an obstacle or in a reverberant space.
- Windows extensions include EFX and support for EAX calls.
- Other extensions cover multichannel buffers and audio formats such as float32, ALAW, and IMA4; available formats depend on the implementation.
Games call the library to render audio
OpenAL is an API, not a standalone audio player. A game or other application must be built to use it and supplies the sound data and instructions for sources and the listener. Installing the library can provide the OpenAL component required by a program that depends on it, but it does not add OpenAL controls to the desktop.
OpenAL Soft is a software implementation of the API. Its capabilities include streaming audio, multichannel buffers, and audio capture, alongside 3D playback.
Pros
- Models sound sources and a listener in 3D space
- Supports distance attenuation, Doppler shift, and directional emitters
- EFX adds environmental reverb, occlusion, and air absorption
- Extensions cover multichannel audio and additional audio formats
What does OpenAL do?
It provides an API for applications to render audio in a 3D environment, with features such as directional sound, distance attenuation, and Doppler shift.
Why does a game ask for OpenAL?
The game was built to call the OpenAL library for audio playback and 3D sound rendering.
Can OpenAL play audio files by itself?
No. OpenAL is a library for applications; it does not provide a standalone audio player.