aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview')
-rw-r--r--linden/indra/newview/app_settings/settings.xml2
-rw-r--r--linden/indra/newview/llviewermessage.cpp4
-rw-r--r--linden/indra/newview/llviewerobject.cpp6
-rw-r--r--linden/indra/newview/llvoavatar.cpp13
4 files changed, 13 insertions, 12 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 779b668..9ec5727 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -284,7 +284,7 @@
284 <key>Type</key> 284 <key>Type</key>
285 <string>F32</string> 285 <string>F32</string>
286 <key>Value</key> 286 <key>Value</key>
287 <real>1.0</real> 287 <real>0.5</real>
288 </map> 288 </map>
289 <key>AudioLevelUI</key> 289 <key>AudioLevelUI</key>
290 <map> 290 <map>
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index 4543ae4..b947f95 100644
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -111,6 +111,7 @@
111#include "llui.h" // for make_ui_sound 111#include "llui.h" // for make_ui_sound
112#include "lluploaddialog.h" 112#include "lluploaddialog.h"
113#include "llviewercamera.h" 113#include "llviewercamera.h"
114#include "llviewercontrol.h"
114#include "llviewergenericmessage.h" 115#include "llviewergenericmessage.h"
115#include "llviewerinventory.h" 116#include "llviewerinventory.h"
116#include "llviewermenu.h" 117#include "llviewermenu.h"
@@ -3291,6 +3292,9 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
3291 pos_global.mdV[VY] += pos_local.mV[VY]; 3292 pos_global.mdV[VY] += pos_local.mV[VY];
3292 pos_global.mdV[VZ] += pos_local.mV[VZ]; 3293 pos_global.mdV[VZ] += pos_local.mV[VZ];
3293 3294
3295 // Don't play sounds if sound settings are muted.
3296 if (gSavedSettings.getBOOL("MuteSounds")) return;
3297
3294 // Don't play a trigger sound if you can't hear it due 3298 // Don't play a trigger sound if you can't hear it due
3295 // to parcel "local audio only" settings. 3299 // to parcel "local audio only" settings.
3296 if (!LLViewerParcelMgr::getInstance()->canHearSound(pos_global)) return; 3300 if (!LLViewerParcelMgr::getInstance()->canHearSound(pos_global)) return;
diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp
index c560ced..cb3afc5 100644
--- a/linden/indra/newview/llviewerobject.cpp
+++ b/linden/indra/newview/llviewerobject.cpp
@@ -2766,7 +2766,7 @@ BOOL LLViewerObject::updateLOD()
2766 // Update volume of looping sounds 2766 // Update volume of looping sounds
2767 if (mAudioSourcep && mAudioSourcep->isLoop()) 2767 if (mAudioSourcep && mAudioSourcep->isLoop())
2768 { 2768 {
2769 F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : (mAudioGain * gSavedSettings.getF32("AudioLevelSFX")); 2769 F32 volume = mAudioGain * gSavedSettings.getF32("AudioLevelSFX");
2770 mAudioSourcep->setGain(volume); 2770 mAudioSourcep->setGain(volume);
2771 } 2771 }
2772 return FALSE; 2772 return FALSE;
@@ -4331,7 +4331,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow
4331 { 4331 {
4332 BOOL queue = flags & LL_SOUND_FLAG_QUEUE; 4332 BOOL queue = flags & LL_SOUND_FLAG_QUEUE;
4333 mAudioGain = gain; 4333 mAudioGain = gain;
4334 F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : gain * gSavedSettings.getF32("AudioLevelSFX"); 4334 F32 volume = gain * gSavedSettings.getF32("AudioLevelSFX");
4335 mAudioSourcep->setGain(volume); 4335 mAudioSourcep->setGain(volume);
4336 mAudioSourcep->setLoop(flags & LL_SOUND_FLAG_LOOP); 4336 mAudioSourcep->setLoop(flags & LL_SOUND_FLAG_LOOP);
4337 mAudioSourcep->setSyncMaster(flags & LL_SOUND_FLAG_SYNC_MASTER); 4337 mAudioSourcep->setSyncMaster(flags & LL_SOUND_FLAG_SYNC_MASTER);
@@ -4370,7 +4370,7 @@ void LLViewerObject::adjustAudioGain(const F32 gain)
4370 if (mAudioSourcep) 4370 if (mAudioSourcep)
4371 { 4371 {
4372 mAudioGain = gain; 4372 mAudioGain = gain;
4373 F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : mAudioGain * gSavedSettings.getF32("AudioLevelSFX"); 4373 F32 volume = mAudioGain * gSavedSettings.getF32("AudioLevelSFX");
4374 mAudioSourcep->setGain(volume); 4374 mAudioSourcep->setGain(volume);
4375 } 4375 }
4376} 4376}
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp
index d41f72e..fd2487b 100644
--- a/linden/indra/newview/llvoavatar.cpp
+++ b/linden/indra/newview/llvoavatar.cpp
@@ -3797,7 +3797,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
3797 const LLUUID AGENT_FOOTSTEP_ANIMS[] = {ANIM_AGENT_WALK, ANIM_AGENT_RUN, ANIM_AGENT_LAND}; 3797 const LLUUID AGENT_FOOTSTEP_ANIMS[] = {ANIM_AGENT_WALK, ANIM_AGENT_RUN, ANIM_AGENT_LAND};
3798 const S32 NUM_AGENT_FOOTSTEP_ANIMS = sizeof(AGENT_FOOTSTEP_ANIMS) / sizeof(LLUUID); 3798 const S32 NUM_AGENT_FOOTSTEP_ANIMS = sizeof(AGENT_FOOTSTEP_ANIMS) / sizeof(LLUUID);
3799 3799
3800 if ( gAudiop && isAnyAnimationSignaled(AGENT_FOOTSTEP_ANIMS, NUM_AGENT_FOOTSTEP_ANIMS) ) 3800 if ( gAudiop && !gSavedSettings.getBOOL("MuteAmbient") && isAnyAnimationSignaled(AGENT_FOOTSTEP_ANIMS, NUM_AGENT_FOOTSTEP_ANIMS) )
3801 { 3801 {
3802 BOOL playSound = FALSE; 3802 BOOL playSound = FALSE;
3803 LLVector3 foot_pos_agent; 3803 LLVector3 foot_pos_agent;
@@ -3828,7 +3828,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
3828// AUDIO_STEP_LO_SPEED, AUDIO_STEP_HI_SPEED, 3828// AUDIO_STEP_LO_SPEED, AUDIO_STEP_HI_SPEED,
3829// AUDIO_STEP_LO_GAIN, AUDIO_STEP_HI_GAIN ); 3829// AUDIO_STEP_LO_GAIN, AUDIO_STEP_HI_GAIN );
3830 3830
3831 const F32 STEP_VOLUME = 0.5f; 3831 const F32 STEP_VOLUME = 0.2f;
3832 LLUUID& step_sound_id = getStepSound(); 3832 LLUUID& step_sound_id = getStepSound();
3833 3833
3834 LLVector3d foot_pos_global = gAgent.getPosGlobalFromAgent(foot_pos_agent); 3834 LLVector3d foot_pos_global = gAgent.getPosGlobalFromAgent(foot_pos_agent);
@@ -4800,7 +4800,7 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL
4800 { 4800 {
4801 if (anim_id == ANIM_AGENT_TYPE) 4801 if (anim_id == ANIM_AGENT_TYPE)
4802 { 4802 {
4803 if (gAudiop) 4803 if (gAudiop && !gSavedSettings.getBOOL("MuteAmbient"))
4804 { 4804 {
4805 LLVector3d char_pos_global = gAgent.getPosGlobalFromAgent(getCharacterPosition()); 4805 LLVector3d char_pos_global = gAgent.getPosGlobalFromAgent(getCharacterPosition());
4806 if (LLViewerParcelMgr::getInstance()->canHearSound(char_pos_global) 4806 if (LLViewerParcelMgr::getInstance()->canHearSound(char_pos_global)
@@ -4814,11 +4814,8 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL
4814 // gAudiop->triggerSound(LLUUID(gSavedSettings.getString("UISndTyping")), volume); 4814 // gAudiop->triggerSound(LLUUID(gSavedSettings.getString("UISndTyping")), volume);
4815 //} 4815 //}
4816 //else 4816 //else
4817 { 4817 LLUUID sound_id = LLUUID(gSavedSettings.getString("UISndTyping"));
4818 LLUUID sound_id = LLUUID(gSavedSettings.getString("UISndTyping")); 4818 gAudiop->triggerSound(sound_id, getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_SFX, char_pos_global);
4819 gAudiop->triggerSound(sound_id, getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_SFX, char_pos_global);
4820
4821 }
4822 } 4819 }
4823 } 4820 }
4824 } 4821 }