From 468b26686063325a13d9a830742cfc95d20ed2b3 Mon Sep 17 00:00:00 2001 From: spiral Date: Sat, 7 Jan 2012 23:38:33 +0000 Subject: [PATCH] Remove hard-wired -framework OpenAL We already link to OPENAL_LIBRARY further down. Log some debug OpenAL info, mainly so OSX users can check they are not using Apple's OpenAL. OpenAL Soft is recommended as it fixes many issues. I specify it as follows: cmake -DOPENAL_LIBRARY=/usr/local/lib/libopenal.dylib -DOPENAL_INCLUDE_DIR=/usr/local/include -GXcode ../neo/ (because FindOpenAL.cmake prefers the /System frameworks) --- neo/CMakeLists.txt | 2 +- neo/sound/snd_system.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/neo/CMakeLists.txt b/neo/CMakeLists.txt index 821a2a50..bc53bece 100644 --- a/neo/CMakeLists.txt +++ b/neo/CMakeLists.txt @@ -188,7 +188,7 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang") message(FATAL_ERROR "Unsupported CPU architecture for OSX") endif() - set(sys_libs ${sys_libs} "-framework Carbon -framework Cocoa -framework OpenGL -framework OpenAL -framework IOKit") + set(sys_libs ${sys_libs} "-framework Carbon -framework Cocoa -framework OpenGL -framework IOKit") else() if (cpu STREQUAL "x86" AND X86) add_definitions(-m32) diff --git a/neo/sound/snd_system.cpp b/neo/sound/snd_system.cpp index 4d06be72..72cb4f2b 100644 --- a/neo/sound/snd_system.cpp +++ b/neo/sound/snd_system.cpp @@ -338,6 +338,12 @@ void idSoundSystemLocal::Init() { alcMakeContextCurrent( openalContext ); common->Printf( "Done.\n" ); + // log openal info + common->Printf( "AL_VERSION: %s\n", alGetString(AL_VERSION)); + common->Printf( "AL_VENDOR: %s\n", alGetString(AL_VENDOR)); + common->Printf( "AL_RENDERER: %s\n", alGetString(AL_RENDERER)); + common->Printf( "AL_EXTENSIONS: %s\n", alGetString(AL_EXTENSIONS)); + #if ID_OPENAL_EAX // try to obtain EAX extensions if ( idSoundSystemLocal::s_useEAXReverb.GetBool() && alIsExtensionPresent( ID_ALCHAR "EAX4.0" ) ) {