From 176c91097a18e85f5bb8a68e63a1e77e0784463b Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Tue, 10 Jul 2012 00:52:02 -0400 Subject: [PATCH] Renamed DisableWindAudio to MuteWind and made it actually work This will give Windows(only?) users experiencing the problem with wind sound corruption a way out. --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llvieweraudio.cpp | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2eca82c95..f84237277 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8514,7 +8514,7 @@ 29 - DisableWindAudio + MuteWind Comment Disable the wind audio effect diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index ca75c71e8..e46058591 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -271,9 +271,14 @@ void audio_update_wind(bool force_update) // which is sufficient to completely turn off or turn on wind noise volume_delta = 1.f; } - + // mute wind entirely when the user asked + if (gSavedSettings.getBOOL("MuteWind")) + { + // volume decreases by itself + gAudiop->mMaxWindGain -= gAudiop->mMaxWindGain; + } // mute wind when not /*flying*/ in air - if /*(gAgent.getFlying())*/ (gAgentAvatarp && gAgentAvatarp->mInAir) + else if /*(gAgent.getFlying())*/ (gAgentAvatarp && gAgentAvatarp->mInAir) { // volume increases by volume_delta, up to no more than max_wind_volume gAudiop->mMaxWindGain = llmin(gAudiop->mMaxWindGain + volume_delta, max_wind_volume);