aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview')
-rw-r--r--linden/indra/newview/CMakeLists.txt7
-rw-r--r--linden/indra/newview/llappviewer.cpp3
-rw-r--r--linden/indra/newview/llstartup.cpp24
3 files changed, 29 insertions, 5 deletions
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt
index ddf6897..4bfbf02 100644
--- a/linden/indra/newview/CMakeLists.txt
+++ b/linden/indra/newview/CMakeLists.txt
@@ -8,6 +8,7 @@ include(BuildVersion)
8include(DirectX) 8include(DirectX)
9include(ELFIO) 9include(ELFIO)
10include(FMOD) 10include(FMOD)
11include(OPENAL)
11include(FindOpenGL) 12include(FindOpenGL)
12include(LLAudio) 13include(LLAudio)
13include(LLCharacter) 14include(LLCharacter)
@@ -56,6 +57,7 @@ include_directories(
56 ${LLXML_INCLUDE_DIRS} 57 ${LLXML_INCLUDE_DIRS}
57 ${LSCRIPT_INCLUDE_DIRS} 58 ${LSCRIPT_INCLUDE_DIRS}
58 ${LSCRIPT_INCLUDE_DIRS}/lscript_compile 59 ${LSCRIPT_INCLUDE_DIRS}/lscript_compile
60 ${GSTREAMER_INCLUDE_DIRS}
59 ) 61 )
60 62
61set(viewer_SOURCE_FILES 63set(viewer_SOURCE_FILES
@@ -1239,6 +1241,11 @@ set_source_files_properties(${viewer_CHARACTER_FILES}
1239 1241
1240list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES}) 1242list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES})
1241 1243
1244
1245if (OPENAL)
1246 set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS -DLL_OPENAL)
1247endif (OPENAL)
1248
1242if (FMOD) 1249if (FMOD)
1243 set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS -DLL_FMOD) 1250 set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS -DLL_FMOD)
1244 1251
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 6301421..f442f38 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -1178,7 +1178,8 @@ bool LLAppViewer::cleanup()
1178 1178
1179 llinfos << "Global stuff deleted" << llendflush; 1179 llinfos << "Global stuff deleted" << llendflush;
1180 1180
1181#if !LL_RELEASE_FOR_DOWNLOAD 1181#if (!defined(LL_FMOD)) || (!LL_RELEASE_FOR_DOWNLOAD)
1182 // OpenAL likes to crash on exit if we *don't* explicitly shut it down.
1182 if (gAudiop) 1183 if (gAudiop)
1183 { 1184 {
1184 gAudiop->shutdown(); 1185 gAudiop->shutdown();
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index 0978fbb..941787b 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -45,6 +45,10 @@
45# include "audioengine_fmod.h" 45# include "audioengine_fmod.h"
46#endif 46#endif
47 47
48#ifdef LL_OPENAL
49#include "audioengine_openal.h"
50#endif
51
48#include "llares.h" 52#include "llares.h"
49#include "llcachename.h" 53#include "llcachename.h"
50#include "llviewercontrol.h" 54#include "llviewercontrol.h"
@@ -579,10 +583,17 @@ bool idle_startup()
579 583
580 if (FALSE == gSavedSettings.getBOOL("NoAudio")) 584 if (FALSE == gSavedSettings.getBOOL("NoAudio"))
581 { 585 {
586 gAudiop = NULL;
587
582#ifdef LL_FMOD 588#ifdef LL_FMOD
583 gAudiop = (LLAudioEngine *) new LLAudioEngine_FMOD(); 589 gAudiop = (LLAudioEngine *) new LLAudioEngine_FMOD();
584#else 590#endif
585 gAudiop = NULL; 591
592#ifdef LL_OPENAL
593 if (!gAudiop)
594 {
595 gAudiop = (LLAudioEngine *) new LLAudioEngine_OpenAL();
596 }
586#endif 597#endif
587 598
588 if (gAudiop) 599 if (gAudiop)
@@ -595,11 +606,16 @@ bool idle_startup()
595 void* window_handle = NULL; 606 void* window_handle = NULL;
596#endif 607#endif
597 bool init = gAudiop->init(kAUDIO_NUM_SOURCES, window_handle); 608 bool init = gAudiop->init(kAUDIO_NUM_SOURCES, window_handle);
598 if(!init) 609 if(init)
610 {
611 gAudiop->setMuted(TRUE);
612 }
613 else
599 { 614 {
600 LL_WARNS("AppInit") << "Unable to initialize audio engine" << LL_ENDL; 615 LL_WARNS("AppInit") << "Unable to initialize audio engine" << LL_ENDL;
616 delete gAudiop;
617 gAudiop = NULL;
601 } 618 }
602 gAudiop->setMuted(TRUE);
603 } 619 }
604 } 620 }
605 621