diff options
Diffstat (limited to 'indra/llaudio/llaudioengine.cpp')
-rw-r--r-- | indra/llaudio/llaudioengine.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index 1cc03bddb8..5e540ad8c5 100644 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -97,7 +97,11 @@ void LLAudioEngine::setDefaults() } mMasterGain = 1.f; - mInternalGain = 0.f; + // Setting mInternalGain to an out of range 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, so using -1 forces + // the if statement in setMasterGain to execute when the viewer starts up. + mInternalGain = -1.f; mNextWindUpdate = 0.f; mStreamingAudioImpl = NULL; @@ -1557,6 +1561,10 @@ bool LLAudioSource::hasPendingPreloads() const LLAudioData *adp = iter->second; // note: a bad UUID will forever be !hasDecodedData() // but also !hasValidData(), hence the check for hasValidData() + if (!adp) + { + continue; + } if (!adp->hasDecodedData() && adp->hasValidData()) { // This source is still waiting for a preload |