summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/app_settings/settings.xml31
-rwxr-xr-xindra/newview/llagent.cpp8
-rwxr-xr-xindra/newview/llappviewer.cpp5
-rwxr-xr-xindra/newview/llvoiceclient.cpp7
-rwxr-xr-xindra/newview/llvoiceclient.h3
-rwxr-xr-xindra/newview/llvoicevivox.cpp58
-rwxr-xr-xindra/newview/llvoicevivox.h2
7 files changed, 95 insertions, 19 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 000362ebfd..fa348e0bcd 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -6118,16 +6118,16 @@
<integer>0</integer>
</map>
<key>MemoryLogFrequency</key>
- <map>
- <key>Comment</key>
- <string>Seconds between display of Memory in log (0 for never)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>30.0</real>
- </map>
+ <map>
+ <key>Comment</key>
+ <string>Seconds between display of Memory in log (0 for never)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>600.0</real>
+ </map>
<key>MemoryPrivatePoolEnabled</key>
<map>
<key>Comment</key>
@@ -13509,6 +13509,17 @@
<key>Value</key>
<string>0</string>
</map>
+ <key>VivoxShutdownTimeout</key>
+ <map>
+ <key>Comment</key>
+ <string>shutdown timeout in miliseconds. The amount of time to wait for the service to shutdown gracefully after the last disconnect</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>5</string>
+ </map>
<key>VivoxDebugSIPURIHostName</key>
<map>
<key>Comment</key>
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 24150daea4..56f306138b 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
+ 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 54b4119331..4f89972192 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();
@@ -476,10 +477,9 @@ void LLVivoxVoiceClient::connectorCreate()
std::string savedLogLevel = gSavedSettings.getString("VivoxDebugLevel");
- if(savedLogLevel != "-0")
+ if(savedLogLevel != "0")
{
LL_DEBUGS("Voice") << "creating connector with logging enabled" << LL_ENDL;
- loglevel = "0";
}
stream
@@ -788,15 +788,26 @@ void LLVivoxVoiceClient::stateMachine()
// vivox executable exists. Build the command line and launch the daemon.
LLProcess::Params params;
params.executable = exe_path;
- // SLIM SDK: these arguments are no longer necessary.
-// std::string args = " -p tcp -h -c";
+
std::string loglevel = gSavedSettings.getString("VivoxDebugLevel");
+ std::string shutdown_timeout = gSavedSettings.getString("VivoxShutdownTimeout");
if(loglevel.empty())
{
loglevel = "0"; // turn logging off completely
}
+
params.args.add("-ll");
params.args.add(loglevel);
+
+ std::string log_folder = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "");
+ params.args.add("-lf");
+ params.args.add(log_folder);
+
+ if(!shutdown_timeout.empty())
+ {
+ params.args.add("-st");
+ params.args.add(shutdown_timeout);
+ }
params.cwd = gDirUtilp->getAppRODataDir();
sGatewayPtr = LLProcess::create(params);
@@ -1334,7 +1345,7 @@ void LLVivoxVoiceClient::stateMachine()
{
// Connect to a session by URI
sessionCreateSendMessage(mAudioSession, true, false);
- }
+ }
notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINING);
setState(stateJoiningSession);
@@ -1510,7 +1521,7 @@ void LLVivoxVoiceClient::stateMachine()
// Always reset the terminate request flag when we get here.
mSessionTerminateRequested = false;
- if((mVoiceEnabled || !mIsInitialized) && !mRelogRequested)
+ if((mVoiceEnabled || !mIsInitialized) && !mRelogRequested && !LLApp::isExiting())
{
// Just leaving a channel, go back to stateNoChannel (the "logged in but have no channel" state).
setState(stateNoChannel);
@@ -1632,6 +1643,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();
@@ -2318,6 +2332,14 @@ static void oldSDKTransform (LLVector3 &left, LLVector3 &up, LLVector3 &at, LLVe
#endif
}
+void LLVivoxVoiceClient::setHidden(bool hidden)
+{
+ //SPATTERS hide me
+ mHidden = hidden;
+ sendPositionalUpdate();
+ return;
+}
+
void LLVivoxVoiceClient::sendPositionalUpdate(void)
{
std::ostringstream stream;
@@ -2339,7 +2361,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.
@@ -2406,7 +2438,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 5e876fa2ef..10ebac730d 100755
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -747,6 +747,7 @@ private:
std::string getAudioSessionURI();
std::string getAudioSessionHandle();
+ void setHidden(bool hidden); //virtual
void sendPositionalUpdate(void);
void buildSetCaptureDevice(std::ostringstream &stream);
@@ -775,6 +776,7 @@ private:
bool mMuteMic;
bool mMuteMicDirty;
+ bool mHidden; //Set to true during teleport to hide the agent's position.
// Set to true when the friends list is known to have changed.
bool mFriendsListDirty;