Skip to content


Repository files navigation

osgAudio is an OpenSceneGraph nodekit that wraps OpenAL and FMOD to enable sound toolkits in OSG. The osgAudio library is the result of collaborative work between Ames Lab, ARDEC, Chris Hanson (Alpha Pixel, LLC), and Paul Martz (Skew Matrix Software LLC). It's used as part of the VE-Suite project. osgAudio is open source and available under the GNU LGPL v2.1 software license.

osgAudio supports a compile-time selectable audio back end, which determines support for speaker configurations and specific audio file formats. Common speaker configurations (stereo, 5.1 surround) and file formats (.wav) are supported by both the OpenAL and FMOD back ends (within the limits of OpenAL and FMOD).

The osgAudio library Includes the following features:

Compile-time switchable audio back ends (OpenAL and FMOD currently supported).
Streaming audio.
Positionable listener and sound sources.
Ambient sounds and sound occlusion.
Attenuation and Doppler shifting.
osgdb_osgAudio Dot OSG file format support for the nodes and objects in the osgAudio library.

The project contains a small collection of example programs to demonstrate use of many of osgAudio's features.

The project contains several test programs to ensure correct functionality. Some test programs are specific to the OpenAL/OpenAL++ backend, but equivalent non-backend-specific tests also are included.

See the Installation page.

For support requests beyond issuing bugs through google code please contact Skew Matrix Software, LLC.

All contributions are welcome and will be considered for inclusion in the project. Please contribute any enhancements or bug fixes by opening an issue and use the Contribution from user issue template. Create and attach a compressed patch file containing your changes.

 * OpenSceneGraph Audio Library, osgAudio
 * Original osgAL, Copyright (C) 2004 VRlab, Umeå University
 * Copyright (C) 2010 Chris Hanson, AlphaPixel, LLC
 * OsgAudio requires all of the following libraries:
 *              OpenSceneGraph (, 
 * OsgAudio requires one of the following libraries:
 *              OpenAL++
 *                OpenAL++ dependencies:
 *                  OpenAL
 *                  freeALUT
 *                  OggVorbis (libogg, libvorbis)
 *              FMOD Ex (no dependencies)
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * Lesser General Public License for more details.
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

OpenSceneGraph Audio Library - osgAudio is a small library for adding 3D sound support to the
open source scenegraph OpenSceneGraph.

By adding a SoundNode to the scene a sound can be made following the transformation of the parents.


OpenSceneGraph (and OpenThreads) Currently tested with 2.9.6 and later, should work with
earlier versions too.

One of the two backends:

FMOD Backend Dependencies
FMOD Ex Programmers API (tested with Version: 4.28.07)
The fmodex.dll will need to present at runtime.

OpenAL Backend
OpenAL 1.1 SDK and ALUT are needed when compiling:
The OpenAL++ abstraction layer is included with osgAudio.
LibOGG (1.1.4) and LibVorbis (1.2.3):

OpenAL runtime distribution must be installed at runtime:
oalinst	(Summer 2009 Version,  

Build under Linux:

Untested. CMake files should be portable to Linux.

Build under Windows:

OpenAL Audio subsystem:
Due to missing version information in the OpenAL header files,
a macro named OPENAL_VERSION was introduced.
Under unix, this is managed automatically from the content of the
OpenAL header files (in
Unfortunately there is no such mechanism in windows.
Therefore the OpenAL version has to be determined manually (check
and set in include/openalpp/windowsstuff
Default is OPENAL_VERSION == 2007 (latest).

LibOGG and LibVorbis (including vorbisfile) must be built prior to building osgAudio+openAL++.

No special steps.

Navigate to the osgAudio folder within CMake and
configure all necessary paths, then generate build files for your development tools.

CMake settings:
All the boolean user-controlled options are prefixed with 0_ to force CMake to sort them
to the top of the list. One of either 0_ENABLE_SUBSYSTEM_OPENAL or 0_ENABLE_SUBSYSTEM_FMOD
should be checked, but not both.
0_BUILD_EXAMPLES_OSGAUDIO builds the high-level OSG-integrated demo examples and is recommended.
0_BUILD_EXAMPLES_OSGAUDIO_LOWLEVEL builds the low-level non-OSG-dependent examples that mimic the
  original OpenAL++ low-level examples, but use the osgAudio abstraction layer. Recommended.
0_BUILD_EXAMPLES_OPENALPP builds the original low-level non-OSG-dependent examples that use the
  OpenAL++ API directly and not the osgAudio abstraction layer. These will only build if you compile
  with the OpenAL++ backend enabled. Recommended if you build with OpenAL++

Audio recording, live audio input streams, and grouped audio sources are unimplemented in FMOD. Some
more esoteric settings (such as reverb) may not be implemented in FMOD if a mapping between the
original functionality and FMOD's API couldn't be found.

  If you are building for OpenAL++, first test the OpenAL++ low-level examples (example_oalpp_*).
  If you are using FMOD, or if that step passes, then test the osgAudio low-level example/demo
  programs (example_osgaudiolow_*). When those run ok, try the osgAudio high-level OSG-integrated
  examples (example_osgaudio_*).

Chris 'Xenon' Hanson, AlphaPixel, LLC.


OpenAL and FMOD audio support for OSG applications.







No packages published