aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-11-19 12:51:29 -0600
committerJacek Antonelli2008-11-19 16:55:13 -0600
commit97e6c15e935666c1b295b7508a182d0da4b481f1 (patch)
treeef1d5e6a33a71b51a3deadb6de54a67b6a8c7f5e /linden/indra/newview/llstartup.cpp
parentChanged to Imprudence.exec_marker to match llappviewer.cpp. (diff)
downloadmeta-impy-97e6c15e935666c1b295b7508a182d0da4b481f1.zip
meta-impy-97e6c15e935666c1b295b7508a182d0da4b481f1.tar.gz
meta-impy-97e6c15e935666c1b295b7508a182d0da4b481f1.tar.bz2
meta-impy-97e6c15e935666c1b295b7508a182d0da4b481f1.tar.xz
VWR-2662: OpenAL support (patch by Tofu Linden)
Diffstat (limited to 'linden/indra/newview/llstartup.cpp')
-rw-r--r--linden/indra/newview/llstartup.cpp24
1 files changed, 20 insertions, 4 deletions
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