diff options
author | Aimee Linden <aimee@lindenlab.com> | 2010-02-18 12:11:51 +0000 |
---|---|---|
committer | Aimee Linden <aimee@lindenlab.com> | 2010-02-18 12:11:51 +0000 |
commit | 5ab2980f9c4d6c33484b18d5d87c79d52acffaa3 (patch) | |
tree | 4567d024cd31e84f7847e76b5ffa407d6b7fc024 | |
parent | d1f48407056359d8b52c9822127119c3115d99e1 (diff) | |
parent | 1ae70e112a466a6ed5baf4e05c1771218c78b2f5 (diff) |
merge with ssh://hg.lindenlab.com/q/viewer-hotfix/
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llvoiceclient.cpp | 15 |
2 files changed, 9 insertions, 17 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 1a8a6ee23d..73c08c4867 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10393,17 +10393,6 @@ <key>Value</key> <integer>1</integer> </map> - <key>VoiceDefaultInternalLevel</key> - <map> - <key>Comment</key> - <string>Internal level of voice set by default. Is equivalent to 0.5 (from 0.0-1.0 range) external voice level (internal = 400 * external^2).</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>S32</string> - <key>Value</key> - <integer>100</integer> - </map> <key>VoiceEarLocation</key> <map> <key>Comment</key> diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 3d153db733..59606f17b2 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -1115,10 +1115,9 @@ public: * Gets stored external (vivox) volume level for specified speaker and * transforms it into internal (viewer) level. * - * If specified user is not found default level will be returned. It is equivalent of - * external level 0.5 from the 0.0..1.0 range. + * If specified user is not found -1 will be returned. * Internal level is calculated as: internal = 400 * external^2 - * Maps 0.0 to 1.0 to internal values 0-400 with default 0.5 == 100 + * Maps 0.0 to 1.0 to internal values 0-400 * * @param[in] speaker_id - LLUUID of user to get his volume level */ @@ -1157,9 +1156,8 @@ void LLSpeakerVolumeStorage::storeSpeakerVolume(const LLUUID& speaker_id, F32 vo S32 LLSpeakerVolumeStorage::getSpeakerVolume(const LLUUID& speaker_id) { - // default internal level of user voice. - const static LLUICachedControl<S32> DEFAULT_INTERNAL_VOLUME_LEVEL("VoiceDefaultInternalLevel", 100); - S32 ret_val = DEFAULT_INTERNAL_VOLUME_LEVEL; + // Return value of -1 indicates no level is stored for this speaker + S32 ret_val = -1; speaker_data_map_t::const_iterator it = mSpeakersData.find(speaker_id); if (it != mSpeakersData.end()) @@ -5045,6 +5043,11 @@ LLVoiceClient::participantState *LLVoiceClient::sessionState::addParticipant(con mParticipantsByUUID.insert(participantUUIDMap::value_type(&(result->mAvatarID), result)); result->mUserVolume = LLSpeakerVolumeStorage::getInstance()->getSpeakerVolume(result->mAvatarID); + if (result->mUserVolume != -1) + { + result->mVolumeDirty = true; + mVolumeDirty = true; + } LL_DEBUGS("Voice") << "participant \"" << result->mURI << "\" added." << LL_ENDL; } |