summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-18 13:54:31 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-18 13:54:31 +0000
commitfa03910a34e5c32149793605bc481de00ada5e1c (patch)
tree4031b84aa15994e6b2508b6c00aae61749d83e7c
parent7f3b3d3bd6403e4f343df8a6481f66b989ad2d56 (diff)
parent5ab2980f9c4d6c33484b18d5d87c79d52acffaa3 (diff)
merge.
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llvoiceclient.cpp15
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;
}