diff options
author | Roxie Linden <roxie@lindenlab.com> | 2024-02-03 20:41:40 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-02-22 23:11:37 -0800 |
commit | 9ac4334ff38a6aec26384fd37c33805105231928 (patch) | |
tree | 636163fee303df5dc130a1e73cba54f854c5eb0d | |
parent | 9389532761ca3987a37a705d534f4ca62baf7697 (diff) |
small logic errors in mute/volume for others code
-rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 8 |
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); |