summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-08-02 21:47:10 +0800
committerErik Kundiman <erik@megapahit.org>2024-08-03 19:50:12 +0800
commit96d322edfcb97096f701ef11d5fdd1f1c97255ac (patch)
tree20229cbf7c4412d3d7c0a69c6c4b754b2cc060e9 /indra/newview/llstartup.cpp
parente5c159597f159c308df878d053b591783337a3a1 (diff)
Bring back FMOD, to be used on Fedora only, though
https://megapahit.com/show_bug.cgi?id=64 Dullahan is still not working, something in webrtc-voice is breaking it too. But at least we're halfway now that we don't have to use Fedora's OpenAL that is in conflict with Dullahan/CEF.
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r--indra/newview/llstartup.cpp28
1 files changed, 26 insertions, 2 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index a8fc1451f5..0765dc47b7 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -40,6 +40,10 @@
#include "llviewermedia_streamingaudio.h"
#include "llaudioengine.h"
+#ifdef LL_FMODSTUDIO
+# include "llaudioengine_fmodstudio.h"
+#endif
+
#ifdef LL_OPENAL
#include "llaudioengine_openal.h"
#endif
@@ -656,6 +660,15 @@ bool idle_startup()
delete gAudiop;
gAudiop = NULL;
+#ifdef LL_FMODSTUDIO
+#if !LL_WINDOWS
+ if (NULL == getenv("LL_BAD_FMODSTUDIO_DRIVER"))
+#endif // !LL_WINDOWS
+ {
+ gAudiop = (LLAudioEngine *) new LLAudioEngine_FMODSTUDIO(gSavedSettings.getBOOL("FMODExProfilerEnable"));
+ }
+#endif
+
#ifdef LL_OPENAL
#if !LL_WINDOWS
if (NULL == getenv("LL_BAD_OPENAL_DRIVER"))
@@ -676,8 +689,19 @@ bool idle_startup()
#endif
if (gAudiop->init(window_handle, LLAppViewer::instance()->getSecondLifeTitle()))
{
- LL_INFOS("AppInit") << "Using media plugins to render streaming audio" << LL_ENDL;
- gAudiop->setStreamingAudioImpl(new LLStreamingAudio_MediaPlugins());
+ if (FALSE == gSavedSettings.getBOOL("UseMediaPluginsForStreamingAudio"))
+ {
+ LL_INFOS("AppInit") << "Using default impl to render streaming audio" << LL_ENDL;
+ gAudiop->setStreamingAudioImpl(gAudiop->createDefaultStreamingAudioImpl());
+ }
+
+ // if the audio engine hasn't set up its own preferred handler for streaming audio
+ // then set up the generic streaming audio implementation which uses media plugins
+ if (NULL == gAudiop->getStreamingAudioImpl())
+ {
+ LL_INFOS("AppInit") << "Using media plugins to render streaming audio" << LL_ENDL;
+ gAudiop->setStreamingAudioImpl(new LLStreamingAudio_MediaPlugins());
+ }
gAudiop->setMuted(true);
}