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.cpp113
1 files changed, 61 insertions, 52 deletions
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 94407ed08c..082dcb50a2 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -62,6 +62,7 @@
#include "llfirstuse.h"
#include "llviewerwindow.h"
#include "llviewercamera.h"
+#include "llvoavatarself.h"
#include "llfloaterfriends.h" //VIVOX, inorder to refresh communicate panel
#include "llfloaterchat.h" // for LLFloaterChat::addChat()
@@ -1103,58 +1104,61 @@ static void killGateway()
///////////////////////////////////////////////////////////////////////////////////////////////
-LLVoiceClient::LLVoiceClient()
-{
- gVoiceClient = this;
- mWriteInProgress = false;
- mAreaVoiceDisabled = false;
- mPTT = true;
- mUserPTTState = false;
- mMuteMic = false;
- mSessionTerminateRequested = false;
- mRelogRequested = false;
- mCommandCookie = 0;
- mCurrentParcelLocalID = 0;
- mLoginRetryCount = 0;
-
- mSpeakerVolume = 0;
- mMicVolume = 0;
-
- mAudioSession = NULL;
- mAudioSessionChanged = false;
-
- // Initial dirty state
- mSpatialCoordsDirty = false;
- mPTTDirty = true;
- mFriendsListDirty = true;
- mSpeakerVolumeDirty = true;
- mMicVolumeDirty = true;
- mBuddyListMapPopulated = false;
- mBlockRulesListReceived = false;
- mAutoAcceptRulesListReceived = false;
- mCaptureDeviceDirty = false;
- mRenderDeviceDirty = false;
-
- // Use default values for everything then call updateSettings() after preferences are loaded
- mVoiceEnabled = false;
- mUsePTT = true;
- mPTTIsToggle = false;
- mEarLocation = 0;
- mLipSyncEnabled = false;
+LLVoiceClient::LLVoiceClient() :
+ mState(stateDisabled),
+ mSessionTerminateRequested(false),
+ mRelogRequested(false),
+ mConnected(false),
+ mPump(NULL),
+
+ mTuningMode(false),
+ mTuningEnergy(0.0f),
+ mTuningMicVolume(0),
+ mTuningMicVolumeDirty(true),
+ mTuningSpeakerVolume(0),
+ mTuningSpeakerVolumeDirty(true),
+ mTuningExitState(stateDisabled),
+
+ mAreaVoiceDisabled(false),
+ mAudioSession(NULL),
+ mAudioSessionChanged(false),
+ mNextAudioSession(NULL),
+
+ mCurrentParcelLocalID(0),
+ mNumberOfAliases(0),
+ mCommandCookie(0),
+ mLoginRetryCount(0),
+
+ mBuddyListMapPopulated(false),
+ mBlockRulesListReceived(false),
+ mAutoAcceptRulesListReceived(false),
+ mCaptureDeviceDirty(false),
+ mRenderDeviceDirty(false),
+ mSpatialCoordsDirty(false),
+
+ mPTTDirty(true),
+ mPTT(true),
+ mUsePTT(true),
+ mPTTIsMiddleMouse(false),
+ mPTTKey(0),
+ mPTTIsToggle(false),
+ mUserPTTState(false),
+ mMuteMic(false),
+ mFriendsListDirty(true),
+
+ mEarLocation(0),
+ mSpeakerVolumeDirty(true),
+ mSpeakerMuteDirty(true),
+ mSpeakerVolume(0),
+ mMicVolume(0),
+ mMicVolumeDirty(true),
- mTuningMode = false;
- mTuningEnergy = 0.0f;
- mTuningMicVolume = 0;
- mTuningMicVolumeDirty = true;
- mTuningSpeakerVolume = 0;
- mTuningSpeakerVolumeDirty = true;
-
- // gMuteListp isn't set up at this point, so we defer this until later.
-// gMuteListp->addObserver(&mutelist_listener);
+ mVoiceEnabled(false),
+ mWriteInProgress(false),
- // stash the pump for later use
- // This now happens when init() is called instead.
- mPump = NULL;
+ mLipSyncEnabled(false)
+{
+ gVoiceClient = this;
#if LL_DARWIN || LL_LINUX || LL_SOLARIS
// HACK: THIS DOES NOT BELONG HERE
@@ -5773,6 +5777,11 @@ void LLVoiceClient::setMuteMic(bool muted)
mMuteMic = muted;
}
+bool LLVoiceClient::getMuteMic() const
+{
+ return mMuteMic;
+}
+
void LLVoiceClient::setUserPTTState(bool ptt)
{
mUserPTTState = ptt;
@@ -6901,11 +6910,11 @@ void LLVoiceClient::notifyFriendObservers()
void LLVoiceClient::lookupName(const LLUUID &id)
{
- gCacheName->getName(id, onAvatarNameLookup);
+ gCacheName->get(id, FALSE, &LLVoiceClient::onAvatarNameLookup);
}
//static
-void LLVoiceClient::onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* user_data)
+void LLVoiceClient::onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group)
{
if(gVoiceClient)
{