summaryrefslogtreecommitdiff
path: root/indra/newview/llspeakbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llspeakbutton.cpp')
-rw-r--r--indra/newview/llspeakbutton.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp
index fd39bde118..8f2c877c7a 100644
--- a/indra/newview/llspeakbutton.cpp
+++ b/indra/newview/llspeakbutton.cpp
@@ -61,7 +61,9 @@ void LLSpeakButton::draw()
{
// gVoiceClient is the authoritative global source of info regarding our open-mic state, we merely reflect that state.
bool openmic = gVoiceClient->getUserPTTState();
- mSpeakBtn->setToggleState(openmic);
+ bool voiceenabled = gVoiceClient->voiceEnabled();
+ mSpeakBtn->setToggleState(openmic && voiceenabled);
+ mOutputMonitor->setIsMuted(!voiceenabled);
LLUICtrl::draw();
}
@@ -121,7 +123,7 @@ LLSpeakButton::LLSpeakButton(const Params& p)
mOutputMonitor->setIsAgentControl(true);
//*TODO find a better place to do that
- LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLCallFloater::sOnCurrentChannelChanged, _1));
+ LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLCallFloater::sOnCurrentChannelChanged, _1), true);
}
LLSpeakButton::~LLSpeakButton()