summaryrefslogtreecommitdiff
path: root/indra/newview/llvoiceclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoiceclient.cpp')
-rw-r--r--indra/newview/llvoiceclient.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 62d092e523..3d8ffc35e7 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -177,7 +177,11 @@ void LLVoiceClient::init(LLPumpIO *pump)
void LLVoiceClient::userAuthorized(const std::string& user_id, const LLUUID &agentID)
{
- gAgent.addRegionChangedCallback(boost::bind(&LLVoiceClient::onRegionChanged, this));
+ if (mRegionChangedCallbackSlot.connected())
+ {
+ mRegionChangedCallbackSlot.disconnect();
+ }
+ mRegionChangedCallbackSlot = gAgent.addRegionChangedCallback(boost::bind(&LLVoiceClient::onRegionChanged, this));
#if !__FreeBSD__
LLWebRTCVoiceClient::getInstance()->userAuthorized(user_id, agentID);
#endif
@@ -264,8 +268,8 @@ void LLVoiceClient::setSpatialVoiceModule(const std::string &voice_server_type)
if (inProximalChannel())
{
mSpatialVoiceModule->processChannels(false);
+ module->processChannels(true);
}
- module->processChannels(true);
mSpatialVoiceModule = module;
mSpatialVoiceModule->updateSettings();
}
@@ -683,9 +687,15 @@ bool LLVoiceClient::voiceEnabled()
void LLVoiceClient::setVoiceEnabled(bool enabled)
{
#if !__FreeBSD__
- LLWebRTCVoiceClient::getInstance()->setVoiceEnabled(enabled);
+ if (LLWebRTCVoiceClient::instanceExists())
+ {
+ LLWebRTCVoiceClient::getInstance()->setVoiceEnabled(enabled);
+ }
#endif
- LLVivoxVoiceClient::getInstance()->setVoiceEnabled(enabled);
+ if (LLVivoxVoiceClient::instanceExists())
+ {
+ LLVivoxVoiceClient::getInstance()->setVoiceEnabled(enabled);
+ }
}
void LLVoiceClient::updateMicMuteLogic()