This plugin provides custom nodes for using OpenAL Soft directly in Godot, bypassing Godot's built-in audio system.
- This project uses the openal_soft_bindings repo to invoke OpenAL Soft functions via C#. Clone this repo and add it as a project reference to your existing solution.
- The
soft_oal.dllmust be in the build directory at runtime. It can be obtained from the OpenAL Soft repository.
addons/openal_audio/
├── nodes/
│ ├── ALSource3D.cs # 3D audio source node
│ └── ALManager.cs # Node that manages OpenAL device + context
├── plugin.cfg # Plugin configuration
├── plugin.gd # Plugin registration script
A 3D audio source node that uses OpenAL for playback. Replace AudioStreamPlayer3D with this.
Properties:
Volume(0.0 - 1.0): Audio volumePitch(0.5 - 2.0): Playback pitchMaxDistance: Maximum audible distanceReferenceDistance: Distance at which volume is unchangedLooping: Whether audio should loopStream: AudioStream to play
Methods:
Play(): Start playbackStop(): Stop playbackPause(): Pause playbackIsPlaying(): Check if currently playing
Node that manages the OpenAL context
- Open your Godot project
- Go to
Project > Project Settings > Plugins - Enable "OpenAL Audio"
Create SVG icons in addons/openal_audio/icons/:
audio_source_icon.svglistener_icon.svg
Or remove the icon parameters from plugin.gd if you don't want custom icons.
- The nodes automatically update their 3D positions every frame
- The manager handles OpenAL context creation/destruction