summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2023-09-26 16:37:24 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-02-22 23:11:34 -0800
commitf6becec955bc673c7e0014eb89197fef9128a405 (patch)
tree9aa91b44e48dcc3cd7f69e653c3fc2552df467f8 /indra/newview
parentd9ec32b1c3878dfa7f34b474d8278e13f2d7ece4 (diff)
sdd stereo support to client
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvoicewebrtc.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index 4c687b5807..a1e63c29cf 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -2208,10 +2208,10 @@ void LLWebRTCVoiceClient::sendPositionAndVolumeUpdate(void)
{
audio_level = (F32) mWebRTCDeviceInterface->getAudioLevel();
}
- uint32_t uint_audio_level = (uint32_t) (audio_level * 256);
+ uint32_t uint_audio_level = mMuteMic ? 0 : (uint32_t) (audio_level * 128);
if (uint_audio_level != mAudioLevel)
{
- root["p"] = uint_audio_level;
+ root["p"] = uint_audio_level;
mAudioLevel = uint_audio_level;
participantStatePtr_t participant = findParticipantByID(gAgentID);
if (participant)
@@ -2530,7 +2530,7 @@ void LLWebRTCVoiceClient::OnDataReceived(const std::string& data, bool binary)
{
removeParticipantByID(agent_id);
}
- F32 energyRMS = (F32) (voice_data[participant_id].get("p", Json::Value(participant->mPower)).asInt()) / 256;
+ F32 energyRMS = (F32) (voice_data[participant_id].get("p", Json::Value(participant->mPower)).asInt()) / 128;
// convert to decibles
participant->mPower = energyRMS;
/* WebRTC appears to have deprecated VAD, but it's still in the Audio Processing Module so maybe we
@@ -4487,13 +4487,10 @@ BOOL LLWebRTCVoiceClient::getIsModeratorMuted(const LLUUID& id)
F32 LLWebRTCVoiceClient::getCurrentPower(const LLUUID &id)
{
F32 result = 0;
- if (!mMuteMic)
+ participantStatePtr_t participant(findParticipantByID(id));
+ if (participant)
{
- participantStatePtr_t participant(findParticipantByID(id));
- if (participant)
- {
- result = participant->mPower * 4;
- }
+ result = participant->mPower * 3.5;
}
return result;
}