summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAimee Linden <aimee@lindenlab.com>2010-02-18 12:04:21 +0000
committerAimee Linden <aimee@lindenlab.com>2010-02-18 12:04:21 +0000
commit1ae70e112a466a6ed5baf4e05c1771218c78b2f5 (patch)
tree6bbe8fbe244bc77e4e14c6d32fb5d620055b590f
parentcb3b21a40a410f9279edf5beb7e1f54d9037255b (diff)
EXT-5370: Voice volumes set for other agents reverting between voice sessions
mVolumeDirty needs to be set when recalling volume levels, for both the participant and the session, to trigger sending a volume change message to Vivox. Reviewed by: Lynx.
-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 b1bf132f43..f58f4ac594 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;
}