summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicechannel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoicechannel.cpp')
-rw-r--r--indra/newview/llvoicechannel.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index 18cdd23ed9..917d69fe16 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -278,10 +278,14 @@ void LLVoiceChannel::deactivate()
if (callStarted())
{
setState(STATE_HUNG_UP);
- // mute the microphone if required when returning to the proximal channel
- if (gSavedSettings.getBOOL("AutoDisengageMic") && sCurrentVoiceChannel == this)
+
+ //Default mic is OFF when leaving voice calls
+ if (gSavedSettings.getBOOL("AutoDisengageMic") &&
+ sCurrentVoiceChannel == this &&
+ gVoiceClient->getUserPTTState())
{
gSavedSettings.setBOOL("PTTCurrentlyEnabled", true);
+ gVoiceClient->inputUserControlState(true);
}
}
@@ -498,6 +502,13 @@ void LLVoiceChannelGroup::activate()
LLRecentPeople::instance().add(buddy_id);
}
#endif
+
+ //Mic default state is OFF on initiating/joining Ad-Hoc/Group calls
+ if (gVoiceClient->getUserPTTState() && gVoiceClient->getPTTIsToggle())
+ {
+ gVoiceClient->inputUserControlState(true);
+ }
+
}
}
@@ -811,6 +822,12 @@ void LLVoiceChannelP2P::activate()
// Add the party to the list of people with which we've recently interacted.
LLRecentPeople::instance().add(mOtherUserID);
+
+ //Default mic is ON on initiating/joining P2P calls
+ if (!gVoiceClient->getUserPTTState() && gVoiceClient->getPTTIsToggle())
+ {
+ gVoiceClient->inputUserControlState(true);
+ }
}
}