summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-05-20 14:00:56 -0700
committerRichard Linden <none@none>2010-05-20 14:00:56 -0700
commite98a52a211e7c5d0fad777e561e5a55fcd3e28cd (patch)
tree78cd91584dcdf70e9b5c9b3479b260f22c1e25eb
parentbe20b12c5c225e5dbc564ba32dee87b4bf1722b5 (diff)
tweaked media attenuation to better match object sound attenuation
-rw-r--r--indra/newview/app_settings/settings.xml4
-rw-r--r--indra/newview/llviewermedia.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 7156af57ec..d1bff55011 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5960,7 +5960,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>0.2</real>
+ <real>0.125</real>
</map>
<key>MediaRollOffMin</key>
<map>
@@ -5971,7 +5971,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>7.0</real>
+ <real>5.0</real>
</map>
<key>MediaRollOffMax</key>
<map>
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 4db05e8a98..1c1c86d3cd 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1937,7 +1937,7 @@ void LLViewerMediaImpl::updateVolume()
// attenuated_volume = 1 / (roll_off_rate * (d - min))^2
// the +1 is there so that for distance 0 the volume stays the same
F64 adjusted_distance = mProximityCamera - gSavedSettings.getF32("MediaRollOffMin");
- F64 attenuation = gSavedSettings.getF32("MediaRollOffRate") * adjusted_distance;
+ F64 attenuation = 1.f + (gSavedSettings.getF32("MediaRollOffRate") * adjusted_distance);
attenuation = 1.0 / (attenuation * attenuation);
// the attenuation multiplier should never be more than one since that would increase volume
volume = volume * llmin(1.0, attenuation);