summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicewebrtc.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2023-09-29 19:13:03 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-02-08 18:34:01 -0800
commit8bd96753113a95aaa8c92fe78713498cbc42a437 (patch)
treeb0786ff60b2e62c0de59aaec702704e794389c18 /indra/newview/llvoicewebrtc.cpp
parent35b4c7633e01e727a8ac75eedf32fc3810935617 (diff)
Improve reconnection logic and allow device setting when connected or not connected
Diffstat (limited to 'indra/newview/llvoicewebrtc.cpp')
-rw-r--r--indra/newview/llvoicewebrtc.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index 8962b4de09..b9e5c7a8b2 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -884,6 +884,7 @@ bool LLWebRTCVoiceClient::breakVoiceConnection(bool corowait)
LLSD body;
body["logout"] = TRUE;
httpAdapter->postAndSuspend(httpRequest, url, body);
+ mWebRTCSignalingInterface->shutdownConnection();
return true;
}
@@ -1265,6 +1266,7 @@ bool LLWebRTCVoiceClient::waitForChannel()
if (getVoiceControlState() == VOICE_STATE_SESSION_RETRY)
{
+ mIsProcessingChannels = false;
return true;
}
@@ -2107,7 +2109,7 @@ void LLWebRTCVoiceClient::tuningSetSpeakerVolume(float volume)
float LLWebRTCVoiceClient::tuningGetEnergy(void)
{
- return mWebRTCDeviceInterface->getAudioLevel();
+ return mWebRTCDeviceInterface->getTuningAudioLevel();
}
bool LLWebRTCVoiceClient::deviceSettingsAvailable()
@@ -2200,7 +2202,7 @@ Json::Value LLWebRTCVoiceClient::getPositionAndVolumeUpdateJson(bool force)
if (!mMuteMic)
{
- audio_level = (F32) mWebRTCDeviceInterface->getAudioLevel();
+ audio_level = (F32) mWebRTCAudioInterface->getAudioLevel();
}
uint32_t uint_audio_level = mMuteMic ? 0 : (uint32_t) (audio_level * 128);
if (force || (uint_audio_level != mAudioLevel))
@@ -2564,6 +2566,8 @@ void LLWebRTCVoiceClient::OnRenegotiationNeeded()
{
LL_INFOS("Voice") << "On Renegotiation Needed." << LL_ENDL;
mRelogRequested = TRUE;
+ mIsProcessingChannels = FALSE;
+ notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LOGIN_RETRY);
setVoiceControlStateUnless(VOICE_STATE_SESSION_RETRY);
}
@@ -4503,7 +4507,7 @@ F32 LLWebRTCVoiceClient::getCurrentPower(const LLUUID &id)
participantStatePtr_t participant(findParticipantByID(id));
if (participant)
{
- result = participant->mPower * 3.0;
+ result = participant->mPower * 2.0;
}
return result;
}