summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvoicechannel.cpp21
-rw-r--r--indra/newview/llvoiceclient.cpp4
-rw-r--r--indra/newview/llvoiceclient.h1
3 files changed, 24 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);
+ }
}
}
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index c2d26a1971..899cc35238 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -5883,6 +5883,10 @@ void LLVoiceClient::setPTTIsToggle(bool PTTIsToggle)
mPTTIsToggle = PTTIsToggle;
}
+bool LLVoiceClient::getPTTIsToggle()
+{
+ return mPTTIsToggle;
+}
void LLVoiceClient::setPTTKey(std::string &key)
{
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index 347fae6156..724179847d 100644
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -193,6 +193,7 @@ static void updatePosition(void);
static bool voiceEnabled();
void setUsePTT(bool usePTT);
void setPTTIsToggle(bool PTTIsToggle);
+ bool getPTTIsToggle();
void setPTTKey(std::string &key);
void setEarLocation(S32 loc);
void setVoiceVolume(F32 volume);