Skip to content

How to Install and Configure OpenAL Soft for Cytopia

Pablo Antonio Camacho Jr edited this page Sep 15, 2019 · 8 revisions

How to Install OpenAL Soft

Linux/Unix, Mac OS X, and Windows with compile tools(Visual Studio,MSYS2,MinGW,Cygwin,vcpkg)

Use a package manager

  • Ignore this step, if conan package manager is being used. OpenAL will be install automatically in build if enabled in cmake.

  • On your package manager, simply install the package openal-soft. Alternatively, the package is called openal in some package managers. Make sure the package source comes from Chris Robinson's fork of openal on called OpenAL Soft. https://github.com/kcat/openal-soft

Build from source

  1. Open a terminal
  2. Clone or download OpenAL Soft from https://github.com/kcat/openal-soft
  3. cd openal-soft/build
  4. cmake ..
  5. make
  6. sudo make install

Windows only

Simple install from .zip file

  1. Download openal-soft-1.19.1-bin.zip from https://kcat.strangesoft.net/openal.html
  2. Extract openal-soft-1.19.1-bin.zip
  3. For now, carefully read the instructions in the readme file.
  4. Download and run the OpenAL windows installer from https://www.openal.org/downloads/
  5. Follow the instructions in the readme file in openal-soft-1.19.1-bin. Install appropriately for Windows 32-bit or Windows 64-bit system.

How to Configure OpenAL Soft

1. Build Cytopia with OpenAL support

  • When building with CMake, run this command from the build directory. Make sure OpenAL Soft and SDL2 mixer are enabled.

cmake -DENABLE_SDL2_MIXER=1 -DENABLE_OPENAL_SOFT=1 --build ..

2. Use alsoft-config to configure 3D audio

  1. Open a terminal
  2. run alsoft-config
  3. Configure 3D Audio
  • Configure 3D binaural sound for stereo headphones

    1. Select Playback tab in OpenAL Soft Configuration window.
    2. In the drop-down box for Channels, select Stereo.
    3. In the drop-down box for Stereo Mode, select Headphones.
    4. Click on the Apply button.
    5. Select HRTF tab in OpenAL Soft Configuration window.
    6. In the drop-down box for Preferred HRTF, select one of the options. Try several in the game to see which one you like best.
    7. In the drop-down box for HRTF Mode, select Force on. This makes sure that HRTF is used in Cytopia.
    8. Click on the Apply button.
  • Configure 3D surround sound for 5.1, 6.1, or 7.1 channel surround sound systems

    1. Make sure to setup the connection between your surround sound system and computer.
    2. Select Playback tab in OpenAL Soft Configuration window.
    3. In the drop-down box for Channels, select the option that matches the number of channels in your system e.g. 5.1 Surround for a 5.1 surround sound system.
    4. In the drop-down box for Stereo Mode, select Speakers.
    5. Click on the Apply button.
    6. Select HRTF tab in OpenAL Soft Configuration window.
    7. In the drop-down box for HRTF Mode, select Force off. This makes sure that only stereo binaural audio is not used for Cytopia instead of surround sound.
    8. Click on the Apply button.

3. Enable 3D audio in Cytopia

  1. Open data/resources/settings.json in a text editor.
  2. Change false in Audio3DStatus to true.