summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorJonathan Yap <none@none>2011-01-06 16:53:31 -0500
committerJonathan Yap <none@none>2011-01-06 16:53:31 -0500
commitc53ce73469a1cbb25e72511a8a2e23b7bfe4dfb8 (patch)
tree96b4e058f1e9c89bc8a486c6b0ad171b6139bd1c /indra
parent1034db639462d95e54e9bf9e4d63500b745bb0a2 (diff)
STORM-830 Volume slider isn't properly remembered if set to zero
There is an edge case in setMasterGain during startup which prevents setInternalGain from being called if the master volume setting and mInternalGain both equal 0. In llaudioengine.cpp setting mInternalGain to a very low but non-zero value fixes this issue.
Diffstat (limited to 'indra')
-rw-r--r--indra/llaudio/llaudioengine.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp
index c9cb1cd6e7..8baba79f59 100644
--- a/indra/llaudio/llaudioengine.cpp
+++ b/indra/llaudio/llaudioengine.cpp
@@ -97,7 +97,10 @@ void LLAudioEngine::setDefaults()
}
mMasterGain = 1.f;
- mInternalGain = 0.f;
+ // Setting mInternalGain to a very low but non-zero value fixes the issue reported in STORM-830.
+ // There is an edge case in setMasterGain during startup which prevents setInternalGain from
+ // being called if the master volume setting and mInternalGain both equal 0.
+ mInternalGain = 0.0000000001f;
mNextWindUpdate = 0.f;
mStreamingAudioImpl = NULL;