1. Introduction

OpenAL is an open-source cross-platform library to play 3D sound. It is the default sound backend used by Castle Game Engine to play all the sounds.

If you want to learn how to play sounds using Castle Game Engine, see the manual about sound. This pages only lists some OpenAL-specific information.

2. Installing OpenAL


OpenAL libraries (DLL files) are automatically places alongside the compiled application by our build tool. You don’t need to do anything, just compile and run your application using Castle Game Engine editor or build tool.


Install a package like libopenal1. There is no need to install the package libopenal-dev present on some Linux distributions (it contains C headers and symlinks that we don’t need).


Install by pkg_add -r openal.


You have OpenAL already installed, it is provided by Apple.

3. Command-line options that control the sound outupt


Don’t output any sound (even if OpenAL is available on this system).

--audio-device DEVICE-NAME

Use given DEVICE-NAME for sound output.

To list the available OpenAL devices use the --help command-line option. The --audio-device description will show a list of devices detected.

Particular applications may also expose this choice using a nice GUI, e.g. The Castle has a simple menu to choose the device. In view3dscene you can choose it using "File -> Preferences -> Sound Device" menu item.

To improve this documentation just edit the source of this page in AsciiDoctor (simple wiki-like syntax) and create a pull request to Castle Game Engine WWW (cge-www) repository.