From 75406641836fee796428216df82b7e29ad24443a Mon Sep 17 00:00:00 2001 From: Aura Linden Date: Wed, 13 Aug 2014 18:12:25 -0700 Subject: Ported from defective branch. --- indra/newview/llappviewer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 24150daea4..29b883aef1 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4896,7 +4896,10 @@ void LLAppViewer::idle() // Handle the regular UI idle callbacks as well as // hover callbacks // - + +#ifdef LL_DARWIN SPATTERS may want to make this mac-only. Test on Windows. + if (mQuitRequested) //MAINT-4243 +#endif { // LL_RECORD_BLOCK_TIME(FTM_IDLE_CB); -- cgit v1.3 From 7060527bbc9a7a76cbc3b4b9bb772cb90542fd60 Mon Sep 17 00:00:00 2001 From: Aura Linden Date: Fri, 15 Aug 2014 17:30:09 -0700 Subject: Added delay to Windows shutdown to let SLVoice die a good death. --- indra/newview/app_settings/settings.xml | 4 ++-- indra/newview/llappviewer.cpp | 2 +- indra/newview/llvoicevivox.cpp | 13 ++++++------- 3 files changed, 9 insertions(+), 10 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 757539ee74..fa348e0bcd 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13501,7 +13501,7 @@ VivoxDebugLevel Comment - Logging level to use when launching the vivox daemon SPATTERS FIX VALUE BEFORE CHECKIN + Logging level to use when launching the vivox daemon Persist 1 Type @@ -13518,7 +13518,7 @@ Type String Value - 500 + 5 VivoxDebugSIPURIHostName diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 29b883aef1..bf1a0a4173 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4897,7 +4897,7 @@ void LLAppViewer::idle() // hover callbacks // -#ifdef LL_DARWIN SPATTERS may want to make this mac-only. Test on Windows. +#ifdef LL_DARWIN if (mQuitRequested) //MAINT-4243 #endif { diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 48d458b142..2bee176b8d 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -798,12 +798,9 @@ void LLVivoxVoiceClient::stateMachine() params.args.add("-ll"); params.args.add(loglevel); - //if (loglevel != "0") //SPATTERS - { - std::string log_folder = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); - params.args.add("-lf"); - params.args.add(log_folder); - } + std::string log_folder = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ""); + params.args.add("-lf"); + params.args.add(log_folder); if(!shutdown_timeout.empty()) { @@ -1542,7 +1539,6 @@ void LLVivoxVoiceClient::stateMachine() //MARK: stateLoggingOut case stateLoggingOut: // waiting for logout response // The handler for the AccountLoginStateChangeEvent will transition from here to stateLoggedOut. - LL_INFOS() << "SPATTERS do I need to stay alive here?" << LL_ENDL; break; //MARK: stateLoggedOut @@ -1646,6 +1642,9 @@ void LLVivoxVoiceClient::stateMachine() void LLVivoxVoiceClient::closeSocket(void) { +#ifdef LL_WINDOWS + _sleep(3000); //Wait a moment for socket to close. SPATTERS +#endif mSocket.reset(); mConnected = false; mConnectorHandle.clear(); -- cgit v1.3 From 370aa671c66cfd5e2a338602d2e9765e9ea103f8 Mon Sep 17 00:00:00 2001 From: Aura Linden Date: Fri, 15 Aug 2014 18:49:54 -0700 Subject: Allegedly hides voice position on teleport. Needs testing. --- indra/newview/llagent.cpp | 8 ++++++++ indra/newview/llappviewer.cpp | 4 ++-- indra/newview/llvoiceclient.cpp | 7 +++++++ indra/newview/llvoiceclient.h | 3 +++ indra/newview/llvoicevivox.cpp | 27 +++++++++++++++++++++++++-- indra/newview/llvoicevivox.h | 2 +- 6 files changed, 46 insertions(+), 5 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index bd6025feea..059f21e91e 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3802,6 +3802,10 @@ void LLAgent::restartFailedTeleportRequest() void LLAgent::clearTeleportRequest() { + if(LLVoiceClient::instanceExists()) + { + LLVoiceClient::getInstance()->setHidden(FALSE); + } mTeleportRequest.reset(); } @@ -3820,6 +3824,10 @@ bool LLAgent::hasPendingTeleportRequest() void LLAgent::startTeleportRequest() { + if(LLVoiceClient::instanceExists()) + { + LLVoiceClient::getInstance()->setHidden(TRUE); + } if (hasPendingTeleportRequest()) { if (!isMaturityPreferenceSyncedWithServer()) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 29b883aef1..9cc21ad22e 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4897,8 +4897,8 @@ void LLAppViewer::idle() // hover callbacks // -#ifdef LL_DARWIN SPATTERS may want to make this mac-only. Test on Windows. - if (mQuitRequested) //MAINT-4243 +#ifdef LL_DARWIN //SPATTERS may want to make this mac-only. Test on Windows. + if (!mQuitRequested) //MAINT-4243 #endif { // LL_RECORD_BLOCK_TIME(FTM_IDLE_CB); diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 815965fb0a..2d195be0eb 100755 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -160,6 +160,13 @@ void LLVoiceClient::userAuthorized(const std::string& user_id, const LLUUID &age mVoiceModule->userAuthorized(user_id, agentID); } +void LLVoiceClient::setHidden(bool hidden) +{ + if (mVoiceModule) + { + mVoiceModule->setHidden(hidden); + } +} void LLVoiceClient::terminate() { diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index 1e20a814a0..fb387301be 100755 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -105,6 +105,8 @@ public: virtual void updateSettings()=0; // call after loading settings and whenever they change virtual bool isVoiceWorking() const = 0; // connected to a voice server and voice channel + + virtual void setHidden(bool hidden)=0; // Hides the user from voice. virtual const LLVoiceVersionInfo& getVersion()=0; @@ -342,6 +344,7 @@ public: void setCaptureDevice(const std::string& name); void setRenderDevice(const std::string& name); + void setHidden(bool hidden); const LLVoiceDeviceList& getCaptureDevices(); const LLVoiceDeviceList& getRenderDevices(); diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 48d458b142..1eb0ac6ae0 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -70,6 +70,7 @@ #include "apr_base64.h" #define USE_SESSION_GROUPS 0 +#define VX_NULL_POSITION -2147483648.0 /*The Silence*/ extern LLMenuBarGL* gMenuBarView; extern void handle_voice_morphing_subscribe(); @@ -2334,7 +2335,9 @@ static void oldSDKTransform (LLVector3 &left, LLVector3 &up, LLVector3 &at, LLVe void LLVivoxVoiceClient::setHidden(bool hidden) { + //SPATTERS hide me mHidden = hidden; + sendPositionalUpdate(); return; } @@ -2359,7 +2362,17 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void) l = mAvatarRot.getLeftRow(); u = mAvatarRot.getUpRow(); a = mAvatarRot.getFwdRow(); - pos = mAvatarPosition; + if (mHidden) + { + for (int i=0;i<3;++i) + { + pos.mdV[i] = VX_NULL_POSITION; + } + } + else + { + pos = mAvatarPosition; + } vel = mAvatarVelocity; // SLIM SDK: the old SDK was doing a transform on the passed coordinates that the new one doesn't do anymore. @@ -2426,7 +2439,17 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void) l = earRot.getLeftRow(); u = earRot.getUpRow(); a = earRot.getFwdRow(); - pos = earPosition; + if (mHidden) + { + for (int i=0;i<3;++i) + { + pos.mdV[i] = VX_NULL_POSITION; + } + } + else + { + pos = earPosition; + } vel = earVelocity; // LL_DEBUGS("Voice") << "Sending listener position " << earPosition << LL_ENDL; diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 8829d9e1b4..10ebac730d 100755 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -747,7 +747,7 @@ private: std::string getAudioSessionURI(); std::string getAudioSessionHandle(); - void setHidden(bool hidden); + void setHidden(bool hidden); //virtual void sendPositionalUpdate(void); void buildSetCaptureDevice(std::ostringstream &stream); -- cgit v1.3