From 57b8571a8acd559b7a92c2d5ffbfe96b0c4b5b98 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 24 Sep 2010 16:17:12 -0700 Subject: Added the VoiceDisableMic debug setting to completely disable the ability to open the mic. Also hoisted PTT key handling from LLVivoxVoiceClient up to LLVoiceClient. This cleans up LLVoiceModuleInterface a bit and makes the PTT logic more centralized. Reviewed by Richard. --- indra/newview/llvoiceclient.h | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'indra/newview/llvoiceclient.h') diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index 24d7d7163e..c9aeea35a9 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -191,25 +191,9 @@ public: virtual void setVoiceEnabled(bool enabled)=0; virtual void setLipSyncEnabled(BOOL enabled)=0; virtual BOOL lipSyncEnabled()=0; - virtual void setMuteMic(bool muted)=0; // Use this to mute the local mic (for when the client is minimized, etc), ignoring user PTT state. + virtual void setMuteMic(bool muted)=0; // Set the mute state of the local mic. //@} - - //////////////////////// - /// @name PTT - //@{ - virtual void setUserPTTState(bool ptt)=0; - virtual bool getUserPTTState()=0; - virtual void setUsePTT(bool usePTT)=0; - virtual void setPTTIsToggle(bool PTTIsToggle)=0; - virtual bool getPTTIsToggle()=0; - virtual void toggleUserPTTState(void)=0; - virtual void inputUserControlState(bool down)=0; // interpret any sort of up-down mic-open control input according to ptt-toggle prefs - - virtual void keyDown(KEY key, MASK mask)=0; - virtual void keyUp(KEY key, MASK mask)=0; - virtual void middleMouseState(bool down)=0; - //@} - + ////////////////////////// /// @name nearby speaker accessors //@{ @@ -406,6 +390,9 @@ public: void setUsePTT(bool usePTT); void setPTTIsToggle(bool PTTIsToggle); bool getPTTIsToggle(); + void setPTTKey(std::string &key); + + void updateMicMuteLogic(); BOOL lipSyncEnabled(); @@ -471,6 +458,17 @@ protected: LLCachedControl mVoiceEffectEnabled; LLCachedControl mVoiceEffectDefault; + + bool mPTTDirty; + bool mPTT; + + bool mUsePTT; + bool mPTTIsMiddleMouse; + KEY mPTTKey; + bool mPTTIsToggle; + bool mUserPTTState; + bool mMuteMic; + bool mDisableMic; }; /** -- cgit v1.2.3