diff --git a/CMakeLists.txt b/CMakeLists.txt index cbf65f0d6..bea318dbc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,7 +199,6 @@ option(ENABLE_PROFILE "Set to ON to build FlightGear with gperftools profilin option(SYSTEM_SQLITE "Set to ON to build FlightGear with the system's SQLite3 library" OFF) option(ENABLE_IAX "Set to ON to build FlightGear with IAXClient/fgcom built-in (default)" ON) option(USE_DBUS "Set to ON to build FlightGear with DBus screensaver interaction (default on Linux)" ${USE_DBUS_DEFAULT}) -option(USE_AEONWAVE "Set to ON to use AeonWave instead of OpenAL" OFF) option(SYSTEM_SPEEX "Set to ON to build IAXClient with the system's speex and speexdsp library" ${SYSTEM_SPEEX_DEFAULT}) option(SYSTEM_GSM "Set to ON to build IAXClient with the system's GSM library" ${SYSTEM_GSM_DEFAULT}) option(SYSTEM_FLITE "Set to ON to build Flightgear with the system's Flite library" ${SYSTEM_FLITE_DEFAULT}) @@ -520,7 +519,7 @@ include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS} ${SQLITE3_INCLUDED_DIR} ) if (USE_AEONWAVE) - find_package(AAX COMPONENTS aax REQUIRED) + find_package(AAX REQUIRED) include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS} ${AAX_INCLUDE_DIR} ) diff --git a/CMakeModules/FindAAX.cmake b/CMakeModules/FindAAX.cmake index 4e0bfdcd2..0e21386fb 100644 --- a/CMakeModules/FindAAX.cmake +++ b/CMakeModules/FindAAX.cmake @@ -1,14 +1,19 @@ -# Locate AAX +# Try to find AAX (AeonWave) # This module defines -# AAX_LIBRARIES -# AAX_FOUND, if false, do not try to link to AAX -# AAX_INCLUDE_DIR, where to find the headers +# +# AAX_FOUND - if false, do not try to link to AAX +# AAX_INCLUDE_DIR - where to find the headers +# AAX_LIBRARIES - Link these to use AAX +# +# Copyright (C) 2016-2018 by Erik Hofman. +# Copyright (C) 2016-2018 by Adalin B.V. # # $AAXDIR is an environment variable that would # correspond to the ./configure --prefix=$AAXDIR # used in building AAX. # -# Created by Erik Hofman. +# This file is Public Domain (www.unlicense.org) +# This is free and unencumbered software released into the public domain. FIND_PATH(AAX_INCLUDE_DIR aax/aax.h HINTS @@ -27,14 +32,14 @@ FIND_PATH(AAX_INCLUDE_DIR aax/aax.h ) FIND_LIBRARY(AAX_LIBRARY - NAMES AAX aax AAX32 + NAMES AAX aax libAAX HINTS $ENV{AAXDIR} $ENV{ProgramFiles}/AAX $ENV{ProgramFiles}/AeonWave $ENV{ProgramFiles}/Adalin/AeonWave ${CMAKE_BUILD_DIR}/aax - PATH_SUFFIXES bin lib lib/${CMAKE_LIBRARY_ARCHITECTURE} lib64 libs64 libs libs/Win32 libs/Win64 + PATH_SUFFIXES lib64 lib lib/${CMAKE_LIBRARY_ARCHITECTURE} libs64 libs libs/Win32 libs/Win64 bin PATHS ~/Library/Frameworks /Library/Frameworks @@ -52,7 +57,7 @@ ELSE(AAX_LIBRARY AND AAX_INCLUDE_DIR) ENDIF(NOT AAX_INCLUDE_DIR) IF(NOT AAX_LIBRARY) IF(SINGLE_PACKAGE) - SET(AAX_LIBRARY "${aax_BUILD_DIR}/aax/AAX32.dll") + SET(AAX_LIBRARY "${aax_BUILD_DIR}/aax/AAX.lib") SET(AAX_FOUND "YES") ELSE(SINGLE_PACKAGE) ENDIF(SINGLE_PACKAGE) diff --git a/README.OpenAL b/README.OpenAL deleted file mode 100644 index f21c656ab..000000000 --- a/README.OpenAL +++ /dev/null @@ -1,20 +0,0 @@ -[This file is mirrored in both the FlightGear and SimGear packages.] - -You *must* have the development components of OpenAL installed on your system -to build FlightGear!" You can get a copy here: - - http://connect.creativelabs.com/openal/default.aspx - -Build notes: - -You can download a versioned release of the openal library from -http://www.openal.org/downloads.html. Download the openal source, -release 0.0.8 (dated February 11, 2006) and run: -tar xjvf openal-soft-1.5.304.tar.bz2 -cd openal-soft-1.5.304/ -ccmake . - -[ While running ccmake: press 'c' to configure, press 'c' once more, and - then press 'g' to generate and exit ] - - diff --git a/README.sound b/README.sound new file mode 100644 index 000000000..bee72ffe4 --- /dev/null +++ b/README.sound @@ -0,0 +1,39 @@ +[This file is mirrored in both the FlightGear and SimGear packages.] + +For Sound support FlightGear requires one of the two following packages: +- OpenAL +- AeonWave + +== OpenAL === + +You *must* have the development components of OpenAL installed on your system +to build FlightGear!" You can get a copy here: + + http://connect.creativelabs.com/openal/default.aspx + +Build notes: + +You can download a versioned release of the openal library from +http://www.openal.org/downloads.html. Download the openal source, +release 0.0.8 (dated February 11, 2006) and run: +tar xjvf openal-soft-1.5.304.tar.bz2 +cd openal-soft-1.5.304/ +ccmake . + +[ While running ccmake: press 'c' to configure, press 'c' once more, and + then press 'g' to generate and exit ] + + +== AeonWave === + +For FlightGear AeonWave has a number of advantages over OpenAL: +* Correct Doppler effect behavior +* Default distance attenuation frequency filtering +* Native support for 29 types of audio formats. +* Native support for wav, mp3, vorbis and raw file formats. + +The source code of AeonWave can be found on GitHub: +https://github.com/adalinbv + +Optimized binary packages are available at: +http://www.adalin.com/ diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 9ef12549b..358cb274c 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -2263,8 +2263,8 @@ void Options::processArgResult(int result) cout << renderer << " provided by " << vendor << endl; cout << endl << "No. Device" << endl; - vector devices = smgr.get_available_devices(); - for (vector ::size_type i=0; idevices = smgr.get_available_devices(); + for (vector ::size_type i=0; idevices = get_available_devices(); + std::vector devices = get_available_devices(); for (unsigned int i=0; isetStringValue(devices[i]); + p->setStringValue(devices[i].c_str()); } devices.clear(); } diff --git a/tests/fake_sound.cxx b/tests/fake_sound.cxx index 7d6be270b..5aed290a9 100644 --- a/tests/fake_sound.cxx +++ b/tests/fake_sound.cxx @@ -50,8 +50,8 @@ bool SGSoundMgr::load(const std::string &samplepath, void **data, int *format, s return false; } -std::vector SGSoundMgr::get_available_devices() +std::vector SGSoundMgr::get_available_devices() { - std::vector result; + std::vector result; return result; }