diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-08-07 09:54:31 +0300 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-08-07 14:19:49 +0300 |
| commit | 9094d0281d362bd2caab5a34f42222aa1e24d9c2 (patch) | |
| tree | 685b0b3571fe6d2031b7b9dbfef2e1255ea8bd9a /indra/newview/lloutputmonitorctrl.cpp | |
| parent | ae7f7cd6701ae9fed57c687b03aabad0d954b230 (diff) | |
Adjust some LLVoiceClient functions
Feels like I should have made isParticipant and getParticipantList
static to minimize singleton dependency/calls
Diffstat (limited to 'indra/newview/lloutputmonitorctrl.cpp')
| -rw-r--r-- | indra/newview/lloutputmonitorctrl.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index db43c57139..28433b36f4 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -126,29 +126,31 @@ void LLOutputMonitorCtrl::draw() const F32 LEVEL_1 = LLVoiceClient::OVERDRIVEN_POWER_LEVEL * 2.f / 3.f; const F32 LEVEL_2 = LLVoiceClient::OVERDRIVEN_POWER_LEVEL; + LLVoiceClient* vocie_client = LLVoiceClient::getInstance(); + if (getVisible() && mAutoUpdate && !getIsMuted() && mSpeakerId.notNull()) { - setPower(LLVoiceClient::getInstance()->getCurrentPower(mSpeakerId)); + setPower(vocie_client->getCurrentPower(mSpeakerId)); if(mIsAgentControl) { - setIsTalking(LLVoiceClient::getInstance()->getUserPTTState()); + setIsTalking(vocie_client->getUserPTTState()); } else { - setIsTalking(LLVoiceClient::getInstance()->getIsSpeaking(mSpeakerId)); + setIsTalking(vocie_client->getIsSpeaking(mSpeakerId)); } } if ((mPower == 0.f && !mIsTalking) && mShowParticipantsSpeaking) { std::set<LLUUID> participant_uuids; - LLVoiceClient::instance().getParticipantList(participant_uuids); + vocie_client->getParticipantList(participant_uuids); std::set<LLUUID>::const_iterator part_it = participant_uuids.begin(); F32 power = 0; for (; part_it != participant_uuids.end(); ++part_it) { - power = LLVoiceClient::instance().getCurrentPower(*part_it); + power = vocie_client->getCurrentPower(*part_it); if (power) { mPower = power; |
