LWJGL 3 provides bindings for four audio libraries, ranging from the standard OpenAL cross-platform audio API to the comprehensive FMOD audio engine. Whether you need simple positional 3D sound effects or a full music and mixing solution, there is a binding to suit your needs.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/LWJGL/lwjgl3/llms.txt
Use this file to discover all available pages before exploring further.
The current stable release is 3.4.2. All audio bindings are optional modules. Add only those you need using the LWJGL build configurator.
OpenAL
Maven artifact:org.lwjgl:lwjgl-openalKey classes:
AL10, AL11, ALC10, ALC11, EXTThreadLocalContext, SOFTDirectChannels
OpenAL is the standard cross-platform 3D positional audio API, analogous to OpenGL for graphics. It models sound sources in 3D space with a listener position, enabling distance attenuation, Doppler effects, and directional filtering out of the box. LWJGL exposes the full core API through per-version classes.
| Class | API coverage |
|---|---|
AL10 | OpenAL 1.0 — buffers, sources, listener, gain, pitch |
AL11 | OpenAL 1.1 — alSource3i, alGetSourcei64 extensions |
ALC10 | ALC (audio context) 1.0 — device enumeration and context creation |
ALC11 | ALC 1.1 — alcCaptureOpenDevice for audio capture |
OpenAL Soft
Note: OpenAL Soft is a software implementation of the OpenAL 3D audio API — it is not a separate LWJGL artifact. When you addorg.lwjgl:lwjgl-openal, LWJGL bundles the OpenAL Soft native library as the default OpenAL implementation on platforms where a system OpenAL is not present.
OpenAL Soft is LGPL-licensed, cross-platform, and actively maintained. It supports HRTF-based binaural audio, multiple backends (PulseAudio, ALSA, WASAPI, Core Audio), and many AL extensions not found in older system OpenAL implementations.
LWJGL’s bundled OpenAL Soft native JARs (
lwjgl-openal-natives-*.jar) are what provide the actual audio implementation at runtime on most platforms. You do not need to install a system OpenAL separately.FMOD
Maven artifact:org.lwjgl:lwjgl-fmodKey classes:
FMOD, FMODSystem, FMODSound, FMODChannel, FMODChannelGroup, FMODSTUDIO
FMOD is a professional-grade, end-to-end audio engine used in thousands of commercial games. The LWJGL binding exposes both the low-level FMOD Core API and the higher-level FMOD Studio API for adaptive and interactive audio authoring.
| API layer | Description |
|---|---|
| FMOD Core | Direct sound playback, DSP effects chains, channel mixing, and 3D positioning |
| FMOD Studio | Event-driven audio with live parameter control, authored in the FMOD Studio tool |
- Supports MP3, OGG, WAV, FLAC, AIFF, XMA, and many proprietary formats
- Built-in DSP: reverb, compressor, parametric EQ, convolution reverb
- 3D audio with occlusion, obstruction, and geometry support
- Low-latency output targeting 2 ms on supported hardware
- Live mixing and real-time parameter tweaking via FMOD Studio
Opus
Maven artifact:org.lwjgl:lwjgl-opusKey classes:
Opus, OpusEncoder, OpusDecoder, OpusMSEncoder
Opus is a totally open, royalty-free, highly versatile audio codec standardized by the IETF (RFC 6716). It targets bitrates from 6 kb/s to 510 kb/s and handles both speech and music with low latency — making it ideal for game voice chat, streaming, and compressed audio assets.
| Feature | Detail |
|---|---|
| Bitrate range | 6 – 510 kb/s |
| Sample rates | 8, 12, 16, 24, 48 kHz |
| Frame sizes | 2.5 ms – 120 ms |
| Channels | Mono, stereo, and multichannel (Opus Multistream) |
| License | BSD / royalty-free |
Choosing an Audio Backend
| Use case | Recommended binding |
|---|---|
| Simple 3D positional sound effects | OpenAL (org.lwjgl:lwjgl-openal) |
| Binaural HRTF audio | OpenAL via OpenAL Soft (bundled) |
| Professional adaptive/interactive music | FMOD (org.lwjgl:lwjgl-fmod) |
| Voice chat or audio streaming over a network | Opus (org.lwjgl:lwjgl-opus) |
| Decoding Ogg Vorbis for background music | stb_vorbis (org.lwjgl:lwjgl-stb) |