summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2024-02-03 20:41:40 -0800
committerRoxie Linden <roxie@lindenlab.com>2024-02-08 18:35:55 -0800
commitfd077d8a9b5e2a5d3971b4bcae06f5ee39e6c53b (patch)
treeba0bad71b56c6dcbd14e7ccbc4122f9e32050087 /indra/newview
parent8ab0bb9a41850bd03a9cdc1624a822d8eb24f712 (diff)
small logic errors in mute/volume for others code
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvoicewebrtc.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index e59e267d31..a3f874aacf 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -918,6 +918,10 @@ void LLWebRTCVoiceClient::sessionState::setSpeakerVolume(F32 volume)
void LLWebRTCVoiceClient::sessionState::setUserVolume(const LLUUID& id, F32 volume)
{
+ if (mParticipantsByUUID.find(id) == mParticipantsByUUID.end())
+ {
+ return;
+ }
for (auto& connection : mWebRTCConnections)
{
connection->setUserVolume(id, volume);
@@ -926,7 +930,7 @@ void LLWebRTCVoiceClient::sessionState::setUserVolume(const LLUUID& id, F32 volu
void LLWebRTCVoiceClient::sessionState::setUserMute(const LLUUID& id, bool mute)
{
- if (mParticipantsByUUID.find(id) != mParticipantsByUUID.end())
+ if (mParticipantsByUUID.find(id) == mParticipantsByUUID.end())
{
return;
}
@@ -2582,7 +2586,7 @@ void LLVoiceWebRTCConnection::setUserVolume(const LLUUID& id, F32 volume)
{
Json::Value root = Json::objectValue;
Json::Value user_gain = Json::objectValue;
- user_gain[id.asString()] = (uint32_t)volume*100;
+ user_gain[id.asString()] = (uint32_t)(volume*100);
root["ug"] = user_gain;
Json::FastWriter writer;
std::string json_data = writer.write(root);