diff options
author | Roxie Linden <roxie@lindenlab.com> | 2024-02-08 19:04:01 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-02-22 23:11:37 -0800 |
commit | 1fc6ea0f25f52da56316d038e39c5add5e58747e (patch) | |
tree | 1802a23fb6e0d993b16fdb8496b6e54d4b7d0f05 /indra | |
parent | c827f14f0270a0954fd33e165c2ba94459d9c116 (diff) |
another rebase merge issue
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 399db275ab..df3ca08955 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -1887,7 +1887,7 @@ BOOL LLWebRTCVoiceClient::getIsModeratorMuted(const LLUUID& id) F32 LLWebRTCVoiceClient::getCurrentPower(const LLUUID &id) { - F32 result = 0; + F32 result = 0.0; if (!mSession) { return result; @@ -1895,7 +1895,10 @@ F32 LLWebRTCVoiceClient::getCurrentPower(const LLUUID &id) participantStatePtr_t participant(mSession->findParticipant(id.asString())); if (participant) { - result = participant->mLevel; + if (participant->mIsSpeaking) + { + result = participant->mLevel; + } } return result; } @@ -2965,7 +2968,7 @@ void LLVoiceWebRTCConnection::OnDataReceived(const std::string &data, bool binar F32 volume; if(LLSpeakerVolumeStorage::getInstance()->getSpeakerVolume(agent_id, volume)) { - user_gain[participant_id] = (uint16_t)(volume*200); + user_gain[participant_id] = (uint32_t)(volume * 200); } } @@ -2989,7 +2992,7 @@ void LLVoiceWebRTCConnection::OnDataReceived(const std::string &data, bool binar // convert to decibles participant->mLevel = level; - if (voice_data["participant_id"].isMember("v")) + if (voice_data[participant_id].isMember("v")) { participant->mIsSpeaking = voice_data[participant_id].get("v", Json::Value(false)).asBool(); } |