diff options
author | Roxie Linden <roxie@lindenlab.com> | 2010-02-26 17:34:39 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2010-02-26 17:34:39 -0800 |
commit | 5352954eb65076d877cc74d4328620e910b93d1c (patch) | |
tree | a8bf1c956c0de44a5ab7eb0a2a05d5e9ed29b751 /indra/newview/llvoiceclient.cpp | |
parent | 13d4257868451d1e3a5797bd02a0e6f749cc0836 (diff) | |
parent | b1891e2982cc03ccd695eae82989d3e58695616c (diff) |
automated merge
Diffstat (limited to 'indra/newview/llvoiceclient.cpp')
-rw-r--r-- | indra/newview/llvoiceclient.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 4e8cac0f62..5ecd7575ea 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -781,7 +781,6 @@ class LLViewerParcelVoiceInfo : public LLHTTPNode } }; - const std::string LLSpeakerVolumeStorage::SETTINGS_FILE_NAME = "volume_settings.xml"; LLSpeakerVolumeStorage::LLSpeakerVolumeStorage() @@ -794,7 +793,7 @@ LLSpeakerVolumeStorage::~LLSpeakerVolumeStorage() save(); } -void LLSpeakerVolumeStorage::storeSpeakerVolume(const LLUUID& speaker_id, S32 volume) +void LLSpeakerVolumeStorage::storeSpeakerVolume(const LLUUID& speaker_id, F32 volume) { mSpeakersData[speaker_id] = volume; } @@ -808,7 +807,10 @@ S32 LLSpeakerVolumeStorage::getSpeakerVolume(const LLUUID& speaker_id) if (it != mSpeakersData.end()) { - ret_val = it->second; + F32 f_val = it->second; + // volume can amplify by as much as 4x! + S32 ivol = (S32)(400.f * f_val * f_val); + ret_val = llclamp(ivol, 0, 400); } return ret_val; } @@ -829,7 +831,7 @@ void LLSpeakerVolumeStorage::load() for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); iter != settings_llsd.endMap(); ++iter) { - mSpeakersData.insert(std::make_pair(LLUUID(iter->first), (S32)iter->second.asInteger())); + mSpeakersData.insert(std::make_pair(LLUUID(iter->first), (F32)iter->second.asReal())); } } |