diff options
author | Jacek Antonelli | 2009-02-12 02:06:41 -0600 |
---|---|---|
committer | Jacek Antonelli | 2009-02-12 02:06:45 -0600 |
commit | 61f97b33f9850d21965d397b947a298c16ba576d (patch) | |
tree | a2edff0a7fbc83e2259eda952511b0fbdbea290b /linden/indra/newview/llstartup.cpp | |
parent | Second Life viewer sources 1.22.7-RC (diff) | |
download | meta-impy-61f97b33f9850d21965d397b947a298c16ba576d.zip meta-impy-61f97b33f9850d21965d397b947a298c16ba576d.tar.gz meta-impy-61f97b33f9850d21965d397b947a298c16ba576d.tar.bz2 meta-impy-61f97b33f9850d21965d397b947a298c16ba576d.tar.xz |
Second Life viewer sources 1.22.8-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llstartup.cpp | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index dd4b66c..5f25dc3 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" |
@@ -581,10 +585,28 @@ bool idle_startup() | |||
581 | 585 | ||
582 | if (FALSE == gSavedSettings.getBOOL("NoAudio")) | 586 | if (FALSE == gSavedSettings.getBOOL("NoAudio")) |
583 | { | 587 | { |
584 | #ifdef LL_FMOD | ||
585 | gAudiop = (LLAudioEngine *) new LLAudioEngine_FMOD(); | ||
586 | #else | ||
587 | gAudiop = NULL; | 588 | gAudiop = NULL; |
589 | |||
590 | #ifdef LL_OPENAL | ||
591 | if (!gAudiop | ||
592 | #if !LL_WINDOWS | ||
593 | && NULL == getenv("LL_BAD_OPENAL_DRIVER") | ||
594 | #endif // !LL_WINDOWS | ||
595 | ) | ||
596 | { | ||
597 | gAudiop = (LLAudioEngine *) new LLAudioEngine_OpenAL(); | ||
598 | } | ||
599 | #endif | ||
600 | |||
601 | #ifdef LL_FMOD | ||
602 | if (!gAudiop | ||
603 | #if !LL_WINDOWS | ||
604 | && NULL == getenv("LL_BAD_FMOD_DRIVER") | ||
605 | #endif // !LL_WINDOWS | ||
606 | ) | ||
607 | { | ||
608 | gAudiop = (LLAudioEngine *) new LLAudioEngine_FMOD(); | ||
609 | } | ||
588 | #endif | 610 | #endif |
589 | 611 | ||
590 | if (gAudiop) | 612 | if (gAudiop) |
@@ -597,11 +619,16 @@ bool idle_startup() | |||
597 | void* window_handle = NULL; | 619 | void* window_handle = NULL; |
598 | #endif | 620 | #endif |
599 | bool init = gAudiop->init(kAUDIO_NUM_SOURCES, window_handle); | 621 | bool init = gAudiop->init(kAUDIO_NUM_SOURCES, window_handle); |
600 | if(!init) | 622 | if(init) |
623 | { | ||
624 | gAudiop->setMuted(TRUE); | ||
625 | } | ||
626 | else | ||
601 | { | 627 | { |
602 | LL_WARNS("AppInit") << "Unable to initialize audio engine" << LL_ENDL; | 628 | LL_WARNS("AppInit") << "Unable to initialize audio engine" << LL_ENDL; |
629 | delete gAudiop; | ||
630 | gAudiop = NULL; | ||
603 | } | 631 | } |
604 | gAudiop->setMuted(TRUE); | ||
605 | } | 632 | } |
606 | } | 633 | } |
607 | 634 | ||