diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-10-18 16:25:16 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-10-18 19:52:32 +0300 |
commit | 99937bf3d4c68fa32cdc888b8cd9b9ed9d43fdbf (patch) | |
tree | 54e4983acf68cee3503012aa696a8e3731021b3c /indra | |
parent | 012f7423f5ed71278a082ce67c1e328dded00df7 (diff) |
viewer#2884 Cleanup
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 4e83dde754..dbeccb51d8 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -302,6 +302,10 @@ void LLWebRTCVoiceClient::stopTimer() { if (mIsTimerActive) { + LLMuteList::instanceExists(); + { + LLMuteList::getInstance()->removeObserver(this); + } mIsTimerActive = false; LL::Timers::instance().cancel(mVoiceTimerHandle); } @@ -470,13 +474,6 @@ void LLWebRTCVoiceClient::connectionTimer() LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE; try { - // TODO: Doing some measurement and calculation here, - // we could reduce the timeout to take into account the - // time spent on the previous loop to have the loop - // cycle at exactly 100ms, instead of 100ms + loop - // execution time. - // Could help with voice updates making for smoother - // voice when we're busy. bool voiceEnabled = mVoiceEnabled; if (!isAgentAvatarValid()) @@ -1577,7 +1574,6 @@ void LLWebRTCVoiceClient::setVoiceEnabled(bool enabled) LL_DEBUGS("Voice") << "Starting" << LL_ENDL; mIsTimerActive = true; LLMuteList::getInstance()->addObserver(this); - const F32 SECS_BETWEEN_REQUESTS = 0.5f; mVoiceTimerHandle = LL::Timers::instance().scheduleEvery([this]() { connectionTimer(); return false; }, UPDATE_THROTTLE_SECONDS); } else |