diff options
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; |