aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ChangeLog.txt5
-rw-r--r--linden/indra/llaudio/audioengine.cpp3
-rw-r--r--linden/indra/newview/llviewermessage.cpp9
3 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index fd8ba2e..b896e56 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -3,6 +3,11 @@
3 * linden/indra/llimagej2coj/llimagej2coj.cpp: 3 * linden/indra/llimagej2coj/llimagej2coj.cpp:
4 Backported fix for VWR-4070 from 1.22. 4 Backported fix for VWR-4070 from 1.22.
5 5
6 * linden/indra/llaudio/audioengine.cpp:
7 Applied patch by Zwagoth Klaar for muting sounds before decoding.
8 * linden/indra/newview/llviewermessage.cpp:
9 Ditto.
10
6 11
72009-03-01 McCabe Maxsted <hakushakukun@gmail.com> 122009-03-01 McCabe Maxsted <hakushakukun@gmail.com>
8 13
diff --git a/linden/indra/llaudio/audioengine.cpp b/linden/indra/llaudio/audioengine.cpp
index 7bb65e9..75901e8 100644
--- a/linden/indra/llaudio/audioengine.cpp
+++ b/linden/indra/llaudio/audioengine.cpp
@@ -879,7 +879,8 @@ void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_i
879 // Create a new source (since this can't be associated with an existing source. 879 // Create a new source (since this can't be associated with an existing source.
880 //LL_INFOS("AudioEngine") << "Localized: " << audio_uuid << llendl; 880 //LL_INFOS("AudioEngine") << "Localized: " << audio_uuid << llendl;
881 881
882 if (mMuted) 882 //If we cannot hear it, dont even try to load the sound.
883 if (mMuted || gain == 0.0)
883 { 884 {
884 return; 885 return;
885 } 886 }
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index b947f95..221de59 100644
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -3286,6 +3286,10 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
3286 msg->getVector3Fast(_PREHASH_SoundData, _PREHASH_Position, pos_local); 3286 msg->getVector3Fast(_PREHASH_SoundData, _PREHASH_Position, pos_local);
3287 msg->getF32Fast(_PREHASH_SoundData, _PREHASH_Gain, gain); 3287 msg->getF32Fast(_PREHASH_SoundData, _PREHASH_Gain, gain);
3288 3288
3289 //If we have sounds muted, don't even try to load or trigger the sound.
3290 if(gSavedSettings.getBOOL("MuteSounds") || gain == 0.0)
3291 return;
3292
3289 // adjust sound location to true global coords 3293 // adjust sound location to true global coords
3290 LLVector3d pos_global = from_region_handle(region_handle); 3294 LLVector3d pos_global = from_region_handle(region_handle);
3291 pos_global.mdV[VX] += pos_local.mV[VX]; 3295 pos_global.mdV[VX] += pos_local.mV[VX];
@@ -3317,7 +3321,7 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
3317 3321
3318void process_preload_sound(LLMessageSystem *msg, void **user_data) 3322void process_preload_sound(LLMessageSystem *msg, void **user_data)
3319{ 3323{
3320 if (!gAudiop) 3324 if (!gAudiop || gSavedSettings.getBOOL("MuteSounds"))
3321 { 3325 {
3322 return; 3326 return;
3323 } 3327 }
@@ -3363,6 +3367,9 @@ void process_attached_sound(LLMessageSystem *msg, void **user_data)
3363 msg->getF32Fast(_PREHASH_DataBlock, _PREHASH_Gain, gain); 3367 msg->getF32Fast(_PREHASH_DataBlock, _PREHASH_Gain, gain);
3364 msg->getU8Fast(_PREHASH_DataBlock, _PREHASH_Flags, flags); 3368 msg->getU8Fast(_PREHASH_DataBlock, _PREHASH_Flags, flags);
3365 3369
3370 if(gSavedSettings.getBOOL("MuteSounds") || gain == 0.0)
3371 return;
3372
3366 LLViewerObject *objectp = gObjectList.findObject(object_id); 3373 LLViewerObject *objectp = gObjectList.findObject(object_id);
3367 if (!objectp) 3374 if (!objectp)
3368 { 3375 {