diff options
author | Roxie Linden <roxie@lindenlab.com> | 2023-12-04 15:39:36 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-02-08 18:34:02 -0800 |
commit | ec7bd371f612334f1f81af58a753cff643d7c86e (patch) | |
tree | 185853c9e048707f042b545f1c8b8261c84fc8b9 /indra | |
parent | 63dcf25452fcd19580c60a19f802b240f99a8aee (diff) |
Voice was not renegotiating when re-enabled.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index ddd757c39f..a8285f9aab 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -357,6 +357,8 @@ void LLWebRTCVoiceClient::cleanUp() { LL_DEBUGS("Voice") << LL_ENDL; + mNextAudioSession.reset(); + mAudioSession.reset(); sessionState::deleteAllSessions(); LL_DEBUGS("Voice") << "exiting" << LL_ENDL; } @@ -470,16 +472,19 @@ void LLWebRTCVoiceClient::voiceConnectionCoro() { while (!sShuttingDown) { + llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS); + if (!mVoiceEnabled) + { + continue; + } // add session for region or parcel voice. LLViewerRegion *regionp = gAgent.getRegion(); if (!regionp) { - llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS); continue; } if (regionp->getRegionID().isNull()) { - llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS); continue; } if (!mAudioSession || mAudioSession->mIsSpatial) @@ -503,7 +508,6 @@ void LLWebRTCVoiceClient::voiceConnectionCoro() sessionState::for_each(boost::bind(predProcessSessionStates, _1)); sendPositionAndVolumeUpdate(true); updateOwnVolume(); - llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS); } } catch (const LLCoros::Stop&) @@ -1801,6 +1805,7 @@ void LLWebRTCVoiceClient::setVoiceEnabled(bool enabled) LLVoiceChannel::getCurrentVoiceChannel()->deactivate(); gAgent.setVoiceConnected(false); status = LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED; + cleanUp(); } notifyStatusObservers(status); @@ -2261,6 +2266,7 @@ void LLWebRTCVoiceClient::deleteSession(const sessionStatePtr_t &session) void LLWebRTCVoiceClient::sessionState::deleteAllSessions() { mSessions.clear(); + } void LLWebRTCVoiceClient::verifySessionState(void) |