summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2023-09-13 22:49:39 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-02-22 23:11:34 -0800
commitb476e1545bb398bcda7a9dd693ac3fcc5ab4b7b8 (patch)
tree89827ca3da0d14fb458f86ca459707dfffaa99a6 /indra/newview
parent0a844ef04703270bd20a1871206eb5b868d5f67b (diff)
fix some retry logic and speaker volume logic
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvoicewebrtc.cpp12
-rw-r--r--indra/newview/llvoicewebrtc.h2
2 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index bbe54018e8..d66435e2bc 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -833,7 +833,6 @@ void LLWebRTCVoiceClient::OnVoiceAccountProvisioned(const LLSD& result)
<< (voicePassword.empty() ? "not set" : "set") << " channel sdp " << channelSDP << LL_ENDL;
setLoginInfo(voiceUserName, voicePassword, channelSDP);
- setVoiceControlStateUnless(VOICE_STATE_SESSION_ESTABLISHED, VOICE_STATE_SESSION_RETRY);
}
void LLWebRTCVoiceClient::OnVoiceAccountProvisionFailure(std::string url, int retries, LLSD body, const LLSD& result)
@@ -1518,6 +1517,10 @@ bool LLWebRTCVoiceClient::runSession(const sessionStatePtr_t &session)
{
return false;
}
+ if (getVoiceControlState() == VOICE_STATE_SESSION_RETRY)
+ {
+ break;
+ }
if (mSessionTerminateRequested)
{
@@ -2825,17 +2828,20 @@ void LLWebRTCVoiceClient::OnAudioEstablished(llwebrtc::LLWebRTCAudioInterface *
{
LL_INFOS("Voice") << "On AudioEstablished." << LL_ENDL;
mWebRTCAudioInterface = audio_interface;
+ float speaker_volume = 0;
audio_interface->setMute(true);
{
LLMutexLock lock(&mVoiceStateMutex);
-
- audio_interface->setSpeakerVolume(mSpeakerVolume);
+ speaker_volume = mSpeakerVolume;
}
+ audio_interface->setSpeakerVolume(mSpeakerVolume);
+ setVoiceControlStateUnless(VOICE_STATE_SESSION_ESTABLISHED, VOICE_STATE_SESSION_RETRY);
}
void LLWebRTCVoiceClient::OnRenegotiationNeeded()
{
LL_INFOS("Voice") << "On Renegotiation Needed." << LL_ENDL;
+ mRelogRequested = TRUE;
setVoiceControlStateUnless(VOICE_STATE_SESSION_RETRY);
}
diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h
index e040552ab2..0dad2909d4 100644
--- a/indra/newview/llvoicewebrtc.h
+++ b/indra/newview/llvoicewebrtc.h
@@ -829,7 +829,7 @@ private:
bool mSpeakerVolumeDirty;
bool mSpeakerMuteDirty;
- int mSpeakerVolume;
+ float mSpeakerVolume;
int mMicVolume;
bool mMicVolumeDirty;