summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 3c42734e6e..a291fac5a1 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -201,6 +201,7 @@
#include "llviewercontrol.h"
#include "lleventnotifier.h"
#include "llcallbacklist.h"
+#include "lldeferredsounds.h"
#include "pipeline.h"
#include "llgesturemgr.h"
#include "llsky.h"
@@ -220,6 +221,7 @@
#include "llmachineid.h"
#include "llmainlooprepeater.h"
+#include <queue>
// *FIX: These extern globals should be cleaned up.
// The globals either represent state/config/resource-storage of either
@@ -456,7 +458,7 @@ void idle_afk_check()
}
// A callback set in LLAppViewer::init()
-static void ui_audio_callback(const LLUUID& uuid)
+void ui_audio_callback(const LLUUID& uuid)
{
if (gAudiop)
{
@@ -464,6 +466,15 @@ static void ui_audio_callback(const LLUUID& uuid)
}
}
+// A callback set in LLAppViewer::init()
+static void deferred_ui_audio_callback(const LLUUID& uuid)
+{
+ if (gAudiop)
+ {
+ LLDeferredSounds::instance().deferSound(uuid);
+ }
+}
+
bool create_text_segment_icon_from_url_match(LLUrlMatch* match,LLTextBase* base)
{
if(!match || !base || base->getPlainText())
@@ -778,6 +789,7 @@ bool LLAppViewer::init()
LLUI::initClass(settings_map,
LLUIImageList::getInstance(),
ui_audio_callback,
+ deferred_ui_audio_callback,
&LLUI::sGLScaleFactor);
LL_INFOS("InitInfo") << "UI initialized." << LL_ENDL ;