diff options
| author | Igor Borovkov <iborovkov@productengine.com> | 2010-01-04 13:48:13 +0200 | 
|---|---|---|
| committer | Igor Borovkov <iborovkov@productengine.com> | 2010-01-04 13:48:13 +0200 | 
| commit | ed1eb29c7e329fa4de31fdad4272348059462d73 (patch) | |
| tree | 28e64e5f28c3a459918550a5bd757d6ba6266ede | |
| parent | 5eb4d0b219ed0dd9928ecbcfbffe19fbaa318f22 (diff) | |
implemented EXT-3642 Default mic states for voice calls
--HG--
branch : product-engine
| -rw-r--r-- | indra/newview/llvoicechannel.cpp | 21 | ||||
| -rw-r--r-- | indra/newview/llvoiceclient.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llvoiceclient.h | 1 | 
3 files changed, 24 insertions, 2 deletions
| diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 993853b9a6..8eafb98f4e 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -279,10 +279,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);  		}  	} @@ -499,6 +503,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); +		} +		  	}  } @@ -812,6 +823,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); | 
