diff options
| author | Cho <cho@lindenlab.com> | 2013-01-30 02:56:33 +0000 |
|---|---|---|
| committer | Cho <cho@lindenlab.com> | 2013-01-30 02:56:33 +0000 |
| commit | a7e6dc088fcd3d70dd74f0eef3c120ecd9296913 (patch) | |
| tree | 09d1c90cf506793326ff7d75e9f5d2833d1b0a72 /indra/newview/llappviewer.cpp | |
| parent | 4f0237007a3a21cc502a1a15b0530bceaf5217db (diff) | |
| parent | edb5be4ec0a88931933a27dc7e94d45ea249591d (diff) | |
merging latest changes
Diffstat (limited to 'indra/newview/llappviewer.cpp')
| -rw-r--r-- | indra/newview/llappviewer.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3c42734e6e..2fd9dd0dce 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,7 +221,6 @@ #include "llmachineid.h" #include "llmainlooprepeater.h" - // *FIX: These extern globals should be cleaned up. // The globals either represent state/config/resource-storage of either // this app, or another 'component' of the viewer. App globals should be @@ -460,7 +460,18 @@ static void ui_audio_callback(const LLUUID& uuid) { if (gAudiop) { - gAudiop->triggerSound(uuid, gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI); + SoundData soundData(uuid, gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI); + gAudiop->triggerSound(soundData); + } +} + +// A callback set in LLAppViewer::init() +static void deferred_ui_audio_callback(const LLUUID& uuid) +{ + if (gAudiop) + { + SoundData soundData(uuid, gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI); + LLDeferredSounds::instance().deferSound(soundData); } } @@ -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 ; |
