summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autobuild.xml15
-rw-r--r--doc/contributions.txt9
-rw-r--r--indra/llmessage/lliosocket.cpp26
-rw-r--r--indra/llmessage/lliosocket.h11
-rw-r--r--[-rwxr-xr-x]indra/newview/app_settings/settings.xml0
-rw-r--r--indra/newview/llbottomtray.cpp3
-rw-r--r--[-rwxr-xr-x]indra/newview/llmeshrepository.cpp0
-rw-r--r--indra/newview/llnearbychathandler.cpp24
-rw-r--r--indra/newview/llviewermessage.cpp7
-rw-r--r--indra/newview/llvoicevivox.cpp303
-rw-r--r--indra/newview/llvoicevivox.h15
-rw-r--r--indra/newview/skins/default/xui/da/floater_settings_debug.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_about_land.xml31
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml10
-rw-r--r--[-rwxr-xr-x]indra/newview/skins/default/xui/en/notifications.xml0
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_sound.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_sound_devices.xml170
-rw-r--r--indra/newview/skins/default/xui/es/floater_settings_debug.xml4
-rw-r--r--indra/newview/skins/default/xui/it/floater_settings_debug.xml4
-rw-r--r--indra/newview/skins/default/xui/ja/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/pl/floater_settings_debug.xml4
-rw-r--r--indra/newview/skins/default/xui/pt/floater_settings_debug.xml4
-rw-r--r--[-rwxr-xr-x]scripts/gpu_table_tester0
23 files changed, 385 insertions, 267 deletions
diff --git a/autobuild.xml b/autobuild.xml
index 63701dae79..d1a7107319 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1907,11 +1907,8 @@
<map>
<key>build</key>
<map>
- <key>arguments</key>
+ <key>filters</key>
<array>
- <string>|</string>
- <string>grep</string>
- <string>-v</string>
<string>setenv</string>
</array>
<key>command</key>
@@ -1964,11 +1961,8 @@
<map>
<key>build</key>
<map>
- <key>arguments</key>
+ <key>filters</key>
<array>
- <string>|</string>
- <string>grep</string>
- <string>-v</string>
<string>setenv</string>
</array>
<key>command</key>
@@ -2023,11 +2017,8 @@
<map>
<key>build</key>
<map>
- <key>arguments</key>
+ <key>filters</key>
<array>
- <string>|</string>
- <string>grep</string>
- <string>-v</string>
<string>setenv</string>
</array>
<key>command</key>
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 729c73f777..67e78e87ee 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -103,6 +103,8 @@ Ales Beaumont
Alexandrea Fride
STORM-255
STORM-960
+ STORM-1327
+ STORM-1406
Alissa Sabre
VWR-81
VWR-83
@@ -449,7 +451,13 @@ Jonathan Yap
STORM-1313
STORM-899
STORM-1273
+ STORM-457
+ STORM-1452
+ STORM-1406
+ STORM-1327
+ STORM-1396
STORM-1292
+ STORM-1392
STORM-1302
STORM-1326
Kage Pixel
@@ -784,6 +792,7 @@ Strife Onizuka
SNOW-691
TankMaster Finesmith
STORM-1100
+ STORM-1452
Tayra Dagostino
SNOW-517
SNOW-543
diff --git a/indra/llmessage/lliosocket.cpp b/indra/llmessage/lliosocket.cpp
index ca84fa8bb8..8c752fbe30 100644
--- a/indra/llmessage/lliosocket.cpp
+++ b/indra/llmessage/lliosocket.cpp
@@ -191,7 +191,7 @@ LLSocket::ptr_t LLSocket::create(apr_pool_t* pool, EType type, U16 port)
port = PORT_EPHEMERAL;
}
rv->mPort = port;
- rv->setOptions();
+ rv->setNonBlocking();
return rv;
}
@@ -206,7 +206,7 @@ LLSocket::ptr_t LLSocket::create(apr_socket_t* socket, apr_pool_t* pool)
}
rv = ptr_t(new LLSocket(socket, pool));
rv->mPort = PORT_EPHEMERAL;
- rv->setOptions();
+ rv->setNonBlocking();
return rv;
}
@@ -227,10 +227,10 @@ bool LLSocket::blockingConnect(const LLHost& host)
{
return false;
}
- apr_socket_timeout_set(mSocket, 1000);
+ setBlocking(1000);
ll_debug_socket("Blocking connect", mSocket);
if(ll_apr_warn_status(apr_socket_connect(mSocket, sa))) return false;
- setOptions();
+ setNonBlocking();
return true;
}
@@ -258,11 +258,27 @@ LLSocket::~LLSocket()
}
}
-void LLSocket::setOptions()
+// See http://dev.ariel-networks.com/apr/apr-tutorial/html/apr-tutorial-13.html#ss13.4
+// for an explanation of how to get non-blocking sockets and timeouts with
+// consistent behavior across platforms.
+
+void LLSocket::setBlocking(S32 timeout)
+{
+ LLMemType m1(LLMemType::MTYPE_IO_TCP);
+ // set up the socket options
+ ll_apr_warn_status(apr_socket_timeout_set(mSocket, timeout));
+ ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 0));
+ ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_SNDBUF, LL_SEND_BUFFER_SIZE));
+ ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_RCVBUF, LL_RECV_BUFFER_SIZE));
+
+}
+
+void LLSocket::setNonBlocking()
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
// set up the socket options
ll_apr_warn_status(apr_socket_timeout_set(mSocket, 0));
+ ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 1));
ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_SNDBUF, LL_SEND_BUFFER_SIZE));
ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_RCVBUF, LL_RECV_BUFFER_SIZE));
diff --git a/indra/llmessage/lliosocket.h b/indra/llmessage/lliosocket.h
index 6806e5084a..e0f6c1e34d 100644
--- a/indra/llmessage/lliosocket.h
+++ b/indra/llmessage/lliosocket.h
@@ -153,9 +153,16 @@ protected:
LLSocket(apr_socket_t* socket, apr_pool_t* pool);
/**
- * @brief Set default socket options.
+ * @brief Set default socket options, with SO_NONBLOCK = 0 and a timeout in us.
+ * @param timeout Number of microseconds to wait on this socket. Any
+ * negative number means block-forever. TIMEOUT OF 0 IS NON-PORTABLE.
*/
- void setOptions();
+ void setBlocking(S32 timeout);
+
+ /**
+ * @brief Set default socket options, with SO_NONBLOCK = 1 and timeout = 0.
+ */
+ void setNonBlocking();
public:
/**
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index efe605e5e6..efe605e5e6 100755..100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 01d19c5ba0..79e6c7b66b 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -386,6 +386,7 @@ void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, b
{
bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking();
getChild<LLButton>("speak_flyout_btn")->setEnabled(voice_status);
+ gMenuBarView->getChild<LLView>("Nearby Voice")->setEnabled(voice_status);
if (voice_status)
{
LLFirstUse::speak(true);
@@ -570,7 +571,7 @@ BOOL LLBottomTray::postBuild()
// it takes some time between logging in to world and connecting to voice channel.
getChild<LLButton>("speak_btn")->setEnabled(false);
getChild<LLButton>("speak_flyout_btn")->setEnabled(false);
-
+ gMenuBarView->getChild<LLView>("Nearby Voice")->setEnabled(false);
// Registering Chat Bar to receive Voice client status change notifications.
LLVoiceClient::getInstance()->addObserver(this);
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 6e0722bcf9..6e0722bcf9 100755..100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 68c8d5854e..957b6d5f94 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -481,7 +481,8 @@ void LLNearbyChatHandler::initChannel()
-void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
+void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not really const, see hack below changing chat_msg.mText
+ const LLSD &args)
{
if(chat_msg.mMuted == TRUE)
return;
@@ -489,7 +490,17 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
if(chat_msg.mText.empty())
return;//don't process empty messages
+ // Handle irc styled messages for toast panel
+ // HACK ALERT - changes mText, stripping out IRC style "/me" prefixes
LLChat& tmp_chat = const_cast<LLChat&>(chat_msg);
+ std::string original_message = tmp_chat.mText; // Save un-modified version of chat text
+ if (tmp_chat.mChatStyle == CHAT_STYLE_IRC)
+ {
+ if(!tmp_chat.mFromName.empty())
+ tmp_chat.mText = tmp_chat.mFromName + tmp_chat.mText.substr(3);
+ else
+ tmp_chat.mText = tmp_chat.mText.substr(3);
+ }
LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
{
@@ -540,7 +551,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
LLViewerChat::getChatColor(chat_msg,txt_color);
- LLFloaterScriptDebug::addScriptLine(chat_msg.mText,
+ LLFloaterScriptDebug::addScriptLine(original_message, // Send full message with "/me" style prefix
chat_msg.mFromName,
txt_color,
chat_msg.mFromID);
@@ -571,15 +582,6 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
|| !mChannel->getShowToasts() ) // to prevent toasts in Busy mode
return;//no need in toast if chat is visible or if bubble chat is enabled
- // Handle irc styled messages for toast panel
- if (tmp_chat.mChatStyle == CHAT_STYLE_IRC)
- {
- if(!tmp_chat.mFromName.empty())
- tmp_chat.mText = tmp_chat.mFromName + tmp_chat.mText.substr(3);
- else
- tmp_chat.mText = tmp_chat.mText.substr(3);
- }
-
// arrange a channel on a screen
if(!mChannel->getVisible())
{
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index fc0e6da7a0..f6b01e92cb 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4326,8 +4326,11 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
}
// Don't play sounds from gestures if they are not enabled.
- if (!gSavedSettings.getBOOL("EnableGestureSounds")) return;
-
+ if (object_id == owner_id && !gSavedSettings.getBOOL("EnableGestureSounds"))
+ {
+ return;
+ }
+
gAudiop->triggerSound(sound_id, owner_id, gain, LLAudioEngine::AUDIO_TYPE_SFX, pos_global);
}
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 6ee6822e2f..cd2bbad620 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -195,12 +195,13 @@ static LLVivoxVoiceClientFriendsObserver *friendslist_listener = NULL;
class LLVivoxVoiceClientCapResponder : public LLHTTPClient::Responder
{
public:
- LLVivoxVoiceClientCapResponder(void){};
+ LLVivoxVoiceClientCapResponder(LLVivoxVoiceClient::state requesting_state) : mRequestingState(requesting_state) {};
virtual void error(U32 status, const std::string& reason); // called with bad status codes
virtual void result(const LLSD& content);
private:
+ LLVivoxVoiceClient::state mRequestingState; // state
};
void LLVivoxVoiceClientCapResponder::error(U32 status, const std::string& reason)
@@ -208,6 +209,7 @@ void LLVivoxVoiceClientCapResponder::error(U32 status, const std::string& reason
LL_WARNS("Voice") << "LLVivoxVoiceClientCapResponder::error("
<< status << ": " << reason << ")"
<< LL_ENDL;
+ LLVivoxVoiceClient::getInstance()->sessionTerminate();
}
void LLVivoxVoiceClientCapResponder::result(const LLSD& content)
@@ -216,12 +218,12 @@ void LLVivoxVoiceClientCapResponder::result(const LLSD& content)
LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest response:" << ll_pretty_print_sd(content) << LL_ENDL;
+ std::string uri;
+ std::string credentials;
+
if ( content.has("voice_credentials") )
{
LLSD voice_credentials = content["voice_credentials"];
- std::string uri;
- std::string credentials;
-
if ( voice_credentials.has("channel_uri") )
{
uri = voice_credentials["channel_uri"].asString();
@@ -231,7 +233,12 @@ void LLVivoxVoiceClientCapResponder::result(const LLSD& content)
credentials =
voice_credentials["channel_credentials"].asString();
}
-
+ }
+
+ // set the spatial channel. If no voice credentials or uri are
+ // available, then we simply drop out of voice spatially.
+ if(LLVivoxVoiceClient::getInstance()->parcelVoiceInfoReceived(mRequestingState))
+ {
LLVivoxVoiceClient::getInstance()->setSpatialChannel(uri, credentials);
}
}
@@ -551,18 +558,27 @@ void LLVivoxVoiceClient::userAuthorized(const std::string& user_id, const LLUUID
void LLVivoxVoiceClient::requestVoiceAccountProvision(S32 retries)
{
- if ( gAgent.getRegion() && mVoiceEnabled )
+ LLViewerRegion *region = gAgent.getRegion();
+
+ if ( region && mVoiceEnabled )
{
std::string url =
- gAgent.getRegion()->getCapability(
- "ProvisionVoiceAccountRequest");
-
- if ( url == "" ) return;
-
+ region->getCapability("ProvisionVoiceAccountRequest");
+
+ if ( url.empty() )
+ {
+ // we've not received the capability yet, so return.
+ // the password will remain empty, so we'll remain in
+ // stateIdle
+ return;
+ }
+
LLHTTPClient::post(
- url,
- LLSD(),
- new LLVivoxVoiceAccountProvisionResponder(retries));
+ url,
+ LLSD(),
+ new LLVivoxVoiceAccountProvisionResponder(retries));
+
+ setState(stateConnectorStart);
}
}
@@ -673,7 +689,8 @@ std::string LLVivoxVoiceClient::state2string(LLVivoxVoiceClient::state inState)
CASE(stateVoiceFontsWait);
CASE(stateVoiceFontsReceived);
CASE(stateCreatingSessionGroup);
- CASE(stateNoChannel);
+ CASE(stateNoChannel);
+ CASE(stateRetrievingParcelVoiceInfo);
CASE(stateJoiningSession);
CASE(stateSessionJoined);
CASE(stateRunning);
@@ -741,42 +758,6 @@ void LLVivoxVoiceClient::stateMachine()
}
}
- // Check for parcel boundary crossing
- {
- LLViewerRegion *region = gAgent.getRegion();
- LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
-
- if(region && parcel)
- {
- S32 parcelLocalID = parcel->getLocalID();
- std::string regionName = region->getName();
- std::string capURI = region->getCapability("ParcelVoiceInfoRequest");
-
-// LL_DEBUGS("Voice") << "Region name = \"" << regionName << "\", parcel local ID = " << parcelLocalID << ", cap URI = \"" << capURI << "\"" << LL_ENDL;
-
- // The region name starts out empty and gets filled in later.
- // Also, the cap gets filled in a short time after the region cross, but a little too late for our purposes.
- // If either is empty, wait for the next time around.
- if(!regionName.empty())
- {
- if(!capURI.empty())
- {
- if((parcelLocalID != mCurrentParcelLocalID) || (regionName != mCurrentRegionName))
- {
- // We have changed parcels. Initiate a parcel channel lookup.
- mCurrentParcelLocalID = parcelLocalID;
- mCurrentRegionName = regionName;
-
- parcelChanged();
- }
- }
- else
- {
- LL_WARNS_ONCE("Voice") << "region doesn't have ParcelVoiceInfoRequest capability. This is normal for a short time after teleporting, but bad if it persists for very long." << LL_ENDL;
- }
- }
- }
- }
switch(getState())
{
@@ -1026,22 +1007,9 @@ void LLVivoxVoiceClient::stateMachine()
}
else if(!mAccountName.empty())
{
- LLViewerRegion *region = gAgent.getRegion();
-
- if(region)
+ if ( mAccountPassword.empty() )
{
- if ( region->getCapability("ProvisionVoiceAccountRequest") != "" )
- {
- if ( mAccountPassword.empty() )
- {
- requestVoiceAccountProvision();
- }
- setState(stateConnectorStart);
- }
- else
- {
- LL_WARNS_ONCE("Voice") << "region doesn't have ProvisionVoiceAccountRequest capability!" << LL_ENDL;
- }
+ requestVoiceAccountProvision();
}
}
break;
@@ -1382,11 +1350,7 @@ void LLVivoxVoiceClient::stateMachine()
setState(stateCreatingSessionGroup);
sessionGroupCreateSendMessage();
#else
- // Not using session groups -- skip the stateCreatingSessionGroup state.
- setState(stateNoChannel);
-
- // Initial kick-off of channel lookup logic
- parcelChanged();
+ setState(stateNoChannel);
#endif
break;
@@ -1399,19 +1363,29 @@ void LLVivoxVoiceClient::stateMachine()
}
else if(!mMainSessionGroupHandle.empty())
{
- setState(stateNoChannel);
-
// Start looped recording (needed for "panic button" anti-griefing tool)
recordingLoopStart();
-
- // Initial kick-off of channel lookup logic
- parcelChanged();
+ setState(stateNoChannel);
}
break;
+
+ //MARK: stateRetrievingParcelVoiceInfo
+ case stateRetrievingParcelVoiceInfo:
+ // wait until parcel voice info is received.
+ if(mSessionTerminateRequested || !mVoiceEnabled)
+ {
+ // if a terminate request has been received,
+ // bail and go to the stateSessionTerminated
+ // state. If the cap request is still pending,
+ // the responder will check to see if we've moved
+ // to a new session and won't change any state.
+ setState(stateSessionTerminated);
+ }
+ break;
+
//MARK: stateNoChannel
case stateNoChannel:
-
LL_DEBUGS("Voice") << "State No Channel" << LL_ENDL;
mSpatialJoiningNum = 0;
// Do this here as well as inside sendPositionalUpdate().
@@ -1432,6 +1406,16 @@ void LLVivoxVoiceClient::stateMachine()
{
setState(stateCaptureBufferPaused);
}
+ else if(checkParcelChanged() || (mNextAudioSession == NULL))
+ {
+ // the parcel is changed, or we have no pending audio sessions,
+ // so try to request the parcel voice info
+ // if we have the cap, we move to the appropriate state
+ if(requestParcelVoiceInfo())
+ {
+ setState(stateRetrievingParcelVoiceInfo);
+ }
+ }
else if(sessionNeedsRelog(mNextAudioSession))
{
requestRelog();
@@ -1466,32 +1450,28 @@ void LLVivoxVoiceClient::stateMachine()
notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINING);
setState(stateJoiningSession);
}
- else if(!mSpatialSessionURI.empty())
- {
- // If we're not headed elsewhere and have a spatial URI, return to spatial.
- switchChannel(mSpatialSessionURI, true, false, false, mSpatialSessionCredentials);
- }
break;
-
+
//MARK: stateJoiningSession
case stateJoiningSession: // waiting for session handle
-
- // If this is true we have problem with connection to voice server (EXT-4313).
- // See descriptions of mSpatialJoiningNum and MAX_NORMAL_JOINING_SPATIAL_NUM.
- if(mSpatialJoiningNum == MAX_NORMAL_JOINING_SPATIAL_NUM)
+
+ // If this is true we have problem with connection to voice server (EXT-4313).
+ // See descriptions of mSpatialJoiningNum and MAX_NORMAL_JOINING_SPATIAL_NUM.
+ if(mSpatialJoiningNum == MAX_NORMAL_JOINING_SPATIAL_NUM)
{
- // Notify observers to let them know there is problem with voice
- notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED);
- llwarns << "There seems to be problem with connection to voice server. Disabling voice chat abilities." << llendl;
+ // Notify observers to let them know there is problem with voice
+ notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED);
+ llwarns << "There seems to be problem with connection to voice server. Disabling voice chat abilities." << llendl;
}
-
- // Increase mSpatialJoiningNum only for spatial sessions- it's normal to reach this case for
- // example for p2p many times while waiting for response, so it can't be used to detect errors
- if(mAudioSession && mAudioSession->mIsSpatial)
+
+ // Increase mSpatialJoiningNum only for spatial sessions- it's normal to reach this case for
+ // example for p2p many times while waiting for response, so it can't be used to detect errors
+ if(mAudioSession && mAudioSession->mIsSpatial)
{
- mSpatialJoiningNum++;
+
+ mSpatialJoiningNum++;
}
-
+
// joinedAudioSession() will transition from here to stateSessionJoined.
if(!mVoiceEnabled)
{
@@ -1511,12 +1491,13 @@ void LLVivoxVoiceClient::stateMachine()
}
}
}
- break;
-
+ break;
+
//MARK: stateSessionJoined
case stateSessionJoined: // session handle received
- mSpatialJoiningNum = 0;
+
+ mSpatialJoiningNum = 0;
// It appears that I need to wait for BOTH the SessionGroup.AddSession response and the SessionStateChangeEvent with state 4
// before continuing from this state. They can happen in either order, and if I don't wait for both, things can get stuck.
// For now, the SessionGroup.AddSession response handler sets mSessionHandle and the SessionStateChangeEvent handler transitions to stateSessionJoined.
@@ -1553,7 +1534,7 @@ void LLVivoxVoiceClient::stateMachine()
sessionMediaDisconnectSendMessage(mAudioSession);
setState(stateSessionTerminated);
}
- }
+ }
break;
//MARK: stateRunning
@@ -1565,6 +1546,7 @@ void LLVivoxVoiceClient::stateMachine()
}
else
{
+
if(!inSpatialChannel())
{
// When in a non-spatial channel, never send positional updates.
@@ -1572,8 +1554,22 @@ void LLVivoxVoiceClient::stateMachine()
}
else
{
+ if(checkParcelChanged())
+ {
+ // if the parcel has changed, attempted to request the
+ // cap for the parcel voice info. If we can't request it
+ // then we don't have the cap URL so we do nothing and will
+ // recheck next time around
+ if(requestParcelVoiceInfo())
+ {
+ // we did get the cap, and we made the request,
+ // so go wait for the response.
+ setState(stateRetrievingParcelVoiceInfo);
+ }
+ }
// Do the calculation that enforces the listener<->speaker tether (and also updates the real camera position)
enforceTether();
+
}
// Do notifications for expiring Voice Fonts.
@@ -3840,7 +3836,7 @@ void LLVivoxVoiceClient::participantUpdatedEvent(
// also initialize voice moderate_mode depend on Agent's participant. See EXT-6937.
// *TODO: remove once a way to request the current voice channel moderation mode is implemented.
- if (gAgentID == participant->mAvatarID)
+ if (gAgent.getID() == participant->mAvatarID)
{
speaker_manager->initVoiceModerateMode();
}
@@ -4073,7 +4069,7 @@ void LLVivoxVoiceClient::messageEvent(
}
LL_DEBUGS("Voice") << "adding message, name " << session->mName << " session " << session->mIMSessionID << ", target " << session->mCallerID << LL_ENDL;
- gIMMgr->addMessage(session->mIMSessionID,
+ LLIMMgr::getInstance()->addMessage(session->mIMSessionID,
session->mCallerID,
session->mName.c_str(),
message.c_str(),
@@ -4447,24 +4443,91 @@ LLVivoxVoiceClient::participantState* LLVivoxVoiceClient::findParticipantByID(co
}
-void LLVivoxVoiceClient::parcelChanged()
+
+// Check for parcel boundary crossing
+bool LLVivoxVoiceClient::checkParcelChanged(bool update)
{
- if(getState() >= stateNoChannel)
+ LLViewerRegion *region = gAgent.getRegion();
+ LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+
+ if(region && parcel)
{
- // If the user is logged in, start a channel lookup.
- LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL;
+ S32 parcelLocalID = parcel->getLocalID();
+ std::string regionName = region->getName();
+
+ // LL_DEBUGS("Voice") << "Region name = \"" << regionName << "\", parcel local ID = " << parcelLocalID << ", cap URI = \"" << capURI << "\"" << LL_ENDL;
+
+ // The region name starts out empty and gets filled in later.
+ // Also, the cap gets filled in a short time after the region cross, but a little too late for our purposes.
+ // If either is empty, wait for the next time around.
+ if(!regionName.empty())
+ {
+ if((parcelLocalID != mCurrentParcelLocalID) || (regionName != mCurrentRegionName))
+ {
+ // We have changed parcels. Initiate a parcel channel lookup.
+ if (update)
+ {
+ mCurrentParcelLocalID = parcelLocalID;
+ mCurrentRegionName = regionName;
+ }
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+bool LLVivoxVoiceClient::parcelVoiceInfoReceived(state requesting_state)
+{
+ // pop back to the state we were in when the parcel changed and we managed to
+ // do the request.
+ if(getState() == stateRetrievingParcelVoiceInfo)
+ {
+ setState(requesting_state);
+ return true;
+ }
+ else
+ {
+ // we've dropped out of stateRetrievingParcelVoiceInfo
+ // before we received the cap result, due to a terminate
+ // or transition to a non-voice channel. Don't switch channels.
+ return false;
+ }
+}
+
- std::string url = gAgent.getRegion()->getCapability("ParcelVoiceInfoRequest");
+bool LLVivoxVoiceClient::requestParcelVoiceInfo()
+{
+ LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL;
+
+ // grab the cap for parcel voice info from the region.
+ LLViewerRegion * region = gAgent.getRegion();
+ if (region == NULL)
+ {
+ return false;
+ }
+ // grab the cap.
+ std::string url = gAgent.getRegion()->getCapability("ParcelVoiceInfoRequest");
+ if (!url.empty())
+ {
+ // if we've already retrieved the cap from the region, go ahead and make the request,
+ // and return true so we can go into the state that waits for the response.
+ checkParcelChanged(true);
LLSD data;
+ LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL;
+
LLHTTPClient::post(
- url,
- data,
- new LLVivoxVoiceClientCapResponder);
+ url,
+ data,
+ new LLVivoxVoiceClientCapResponder(getState()));
+ return true;
}
- else
+ else
{
- // The transition to stateNoChannel needs to kick this off again.
- LL_INFOS("Voice") << "not logged in yet, deferring" << LL_ENDL;
+
+ // we don't have the cap yet, so return false so the caller can try again later.
+ LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest cap not yet available, deferring" << LL_ENDL;
+ return false;
}
}
@@ -4488,6 +4551,7 @@ void LLVivoxVoiceClient::switchChannel(
case stateJoinSessionFailed:
case stateJoinSessionFailedWaiting:
case stateNoChannel:
+ case stateRetrievingParcelVoiceInfo:
// Always switch to the new URI from these states.
needsSwitch = true;
break;
@@ -4560,13 +4624,10 @@ void LLVivoxVoiceClient::switchChannel(
mNextAudioSession->mIsP2P = is_p2p;
}
- if(getState() <= stateNoChannel)
- {
- // We're already set up to join a channel, just needed to fill in the session URI
- }
- else
+ if(getState() >= stateRetrievingParcelVoiceInfo)
{
- // State machine will come around and rejoin if uri/handle is not empty.
+ // If we're already in a channel, or if we're joining one, terminate
+ // so we can rejoin with the new session data.
sessionTerminate();
}
}
@@ -6267,13 +6328,13 @@ void LLVivoxVoiceClient::avatarNameResolved(const LLUUID &id, const std::string
{
session->mTextInvitePending = false;
- // We don't need to call gIMMgr->addP2PSession() here. The first incoming message will create the panel.
+ // We don't need to call LLIMMgr::getInstance()->addP2PSession() here. The first incoming message will create the panel.
}
if(session->mVoiceInvitePending)
{
session->mVoiceInvitePending = false;
- gIMMgr->inviteToSession(
+ LLIMMgr::getInstance()->inviteToSession(
session->mIMSessionID,
session->mName,
session->mCallerID,
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 471545de56..1142a1a49c 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -380,7 +380,8 @@ protected:
stateVoiceFontsWait, // Awaiting the list of voice fonts
stateVoiceFontsReceived, // List of voice fonts received
stateCreatingSessionGroup, // Creating the main session group
- stateNoChannel, //
+ stateNoChannel, // Need to join a channel
+ stateRetrievingParcelVoiceInfo, // waiting for parcel voice info request to return with spatial credentials
stateJoiningSession, // waiting for session handle
stateSessionJoined, // session handle received
stateRunning, // in session, steady state
@@ -620,6 +621,8 @@ protected:
void sessionMediaDisconnectSendMessage(sessionState *session);
void sessionTextDisconnectSendMessage(sessionState *session);
+
+
// Pokes the state machine to leave the audio session next time around.
void sessionTerminate();
@@ -629,6 +632,12 @@ protected:
// Does the actual work to get out of the audio session
void leaveAudioSession();
+ // notifies the voice client that we've received parcel voice info
+ bool parcelVoiceInfoReceived(state requesting_state);
+
+ friend class LLVivoxVoiceClientCapResponder;
+
+
void lookupName(const LLUUID &id);
void onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name);
void avatarNameResolved(const LLUUID &id, const std::string &name);
@@ -733,9 +742,11 @@ private:
bool mCaptureDeviceDirty;
bool mRenderDeviceDirty;
+
+ bool checkParcelChanged(bool update = false);
// This should be called when the code detects we have changed parcels.
// It initiates the call to the server that gets the parcel channel.
- void parcelChanged();
+ bool requestParcelVoiceInfo();
void switchChannel(std::string uri = std::string(), bool spatial = true, bool no_reconnect = false, bool is_p2p = false, std::string hash = "");
void joinSession(sessionState *session);
diff --git a/indra/newview/skins/default/xui/da/floater_settings_debug.xml b/indra/newview/skins/default/xui/da/floater_settings_debug.xml
index 016e5af378..f7eda56e48 100644
--- a/indra/newview/skins/default/xui/da/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/da/floater_settings_debug.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="settings_debug" title="DEBUG INDSTILLINGER">
<radio_group name="boolean_combo">
- <radio_item label="SANDT" name="TRUE" value="sand"/>
- <radio_item label="FALSK" name="FALSE" value=""/>
+ <radio_item label="SANDT" name="TRUE" />
+ <radio_item label="FALSK" name="FALSE" />
</radio_group>
<color_swatch label="Farve" name="val_color_swatch"/>
<spinner label="x" name="val_spinner_1"/>
diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index 6e985e0476..ecd2b119c9 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -414,7 +414,7 @@
right="-10"
name="Cancel Land Sale"
left_pad="5"
- top_pad="-15"
+ top_pad="7"
width="180" />
<text
type="string"
@@ -488,6 +488,7 @@
width="186">
0
</text>
+
<button
enabled="false"
follows="left|top"
@@ -495,9 +496,20 @@
label="Buy Land"
layout="topleft"
left_delta="52"
+ top_pad="5"
name="Buy Land..."
- top_pad="7"
width="130" />
+ <button
+ enabled="false"
+ follows="left|top"
+ height="23"
+ label="Linden Sale"
+ layout="topleft"
+ left="10"
+ name="Linden Sale..."
+ tool_tip="Land must be owned, set content, and not already for auction."
+ top_pad="-23"
+ width="150" />
<button
enabled="true"
follows="left|top"
@@ -545,18 +557,7 @@
layout="topleft"
left_delta="0"
name="Reclaim Land..."
- top_delta="-50"
- width="180" />
- <button
- enabled="false"
- follows="left|top"
- height="23"
- label="Linden Sale"
- layout="topleft"
- left_delta="0"
- name="Linden Sale..."
- tool_tip="Land must be owned, set content, and not already for auction."
- top_pad="2"
+ top_delta="-25"
width="180" />
</panel>
<panel
@@ -2125,4 +2126,4 @@ Only large parcels can be listed in search.
</panel>
</panel>
</tab_container>
-</floater>
+</floater> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 6b857cae17..317c6fe9ac 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -232,6 +232,16 @@
function="SideTray.PanelPeopleTab"
parameter="nearby_panel" />
</menu_item_call>
+ <menu_item_check
+ label="Nearby Voice"
+ name="Nearby Voice">
+ <menu_item_check.on_check
+ function="Floater.Visible"
+ parameter="voice_controls" />
+ <menu_item_check.on_click
+ function="Floater.Toggle"
+ parameter="voice_controls" />
+ </menu_item_check>
</menu>
<menu
create_jump_keys="true"
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 60ab4d2bc5..60ab4d2bc5 100755..100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
index 1745c1e4b0..1f92244eb9 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
@@ -385,7 +385,7 @@
height="18"
image_name="Move_Walk_Off"
layout="topleft"
- left_pad="170"
+ left_pad="170"
name="avatar_icon"
mouse_opaque="false"
visible="true"
@@ -496,8 +496,8 @@
filename="panel_sound_devices.xml"
visiblity_control="ShowDeviceSettings"
name="device_settings_panel"
- top="314"
- width="345"
+ top_pad="0"
+ width="480"
left="18"
class="panel_voice_device_settings"/>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_sound_devices.xml b/indra/newview/skins/default/xui/en/panel_sound_devices.xml
index ccae7c5350..0a20a4a965 100644
--- a/indra/newview/skins/default/xui/en/panel_sound_devices.xml
+++ b/indra/newview/skins/default/xui/en/panel_sound_devices.xml
@@ -7,33 +7,46 @@
layout="topleft"
name="device_settings_panel"
width="360">
- <panel.string
- name="default_text">
- Default
- </panel.string>
- <icon
- height="18"
- image_name="Microphone_On"
- left_delta="4"
- name="microphone_icon"
- mouse_opaque="false"
- top="7"
- layout="topleft"
- visible="true"
- width="18" />
- <text
+ <panel.string
+ name="default_text">
+ Default
+ </panel.string>
+ <icon
+ follows="left|top"
+ height="18"
+ image_name="Microphone_On"
+ left_delta="-5"
+ name="microphone_icon"
+ mouse_opaque="false"
+ top="7"
+ layout="topleft"
+ visible="true"
+ width="18" />
+ <icon
+ follows="left|top"
+ height="18"
+ image_name="Parcel_Voice_Dark"
+ layout="topleft"
+ left_pad="220"
+ name="speaker_icon"
+ mouse_opaque="false"
+ top_delta="0"
+ visible="true"
+ width="22" />
+ <text
type="string"
length="1"
- font.style="BOLD"
+ font.style="BOLD"
follows="left|top"
height="16"
layout="topleft"
- left_pad="3"
+ left_pad="-240"
+ top_delta="5"
name="Input"
- width="70">
- Input
- </text>
- <combo_box
+ width="60">
+ Input
+ </text>
+ <combo_box
height="23"
control_name="VoiceInputAudioDevice"
follows="left|top"
@@ -42,33 +55,57 @@
max_chars="128"
name="voice_input_device"
top_delta="-5"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left_delta="-70"
- name="My volume label"
- top_pad="4"
- width="200">
- My volume:
- </text>
- <slider_bar
- control_name="AudioLevelMic"
- follows="top|right|left"
- height="17"
- increment="0.025"
- initial_value="1.0"
- layout="topleft"
- left_delta="-6"
- max_val="2"
- name="mic_volume_slider"
- tool_tip="Change the volume using this slider"
- top_pad="-1"
- width="220" />
- <text
+ width="150" />
+ <text
+ font.style="BOLD"
+ type="string"
+ length="1"
+ follows="left|top"
+ height="15"
+ layout="topleft"
+ left_pad="30"
+ name="Output"
+ top_delta="5"
+ width="60">
+ Output
+ </text>
+ <combo_box
+ control_name="VoiceOutputAudioDevice"
+ height="23"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ max_chars="128"
+ name="voice_output_device"
+ top_delta="-4"
+ width="150" />
+ <text
+ type="string"
+ halign="left"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left_delta="-300"
+ name="My volume label"
+ top_pad="14"
+ width="200">
+ My volume:
+ </text>
+ <slider_bar
+ control_name="AudioLevelMic"
+ follows="top|right|left"
+ height="17"
+ increment="0.025"
+ initial_value="1.0"
+ layout="topleft"
+ left_delta="95"
+ max_val="2"
+ name="mic_volume_slider"
+ tool_tip="Change the volume using this slider"
+ top_pad="-18"
+ width="110" />
+ <text
type="string"
text_color="EmphasisColor"
length="1"
@@ -79,8 +116,8 @@
name="wait_text"
top_delta="-1"
width="110">
- Please wait
- </text>
+ Please wait
+ </text>
<locate
follows="right|top"
height="20"
@@ -121,35 +158,4 @@
name="bar4"
top_delta="0"
width="20" />
- <icon
- height="18"
- image_name="Parcel_Voice_Light"
- left="5"
- name="speaker_icon"
- mouse_opaque="false"
- top_pad="3"
- visible="true"
- width="22" />
- <text
- font.style="BOLD"
- type="string"
- length="1"
- follows="left|top"
- height="15"
- layout="topleft"
- left_pad="0"
- name="Output"
- width="70">
- Output
- </text>
- <combo_box
- control_name="VoiceOutputAudioDevice"
- height="23"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- max_chars="128"
- name="voice_output_device"
- top_delta="-3"
- width="200" />
-</panel>
+</panel> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/es/floater_settings_debug.xml b/indra/newview/skins/default/xui/es/floater_settings_debug.xml
index bca1839f09..1da2e491e1 100644
--- a/indra/newview/skins/default/xui/es/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/es/floater_settings_debug.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="settings_debug" title="CONFIGURACIONES DEL DEPURADOR">
<radio_group name="boolean_combo">
- <radio_item label="VERDADERO" name="TRUE" value="verdadero"/>
- <radio_item label="FALSO" name="FALSE" value=""/>
+ <radio_item label="VERDADERO" name="TRUE" />
+ <radio_item label="FALSO" name="FALSE" />
</radio_group>
<color_swatch label="Color" name="val_color_swatch"/>
<spinner label="x" name="val_spinner_1"/>
diff --git a/indra/newview/skins/default/xui/it/floater_settings_debug.xml b/indra/newview/skins/default/xui/it/floater_settings_debug.xml
index aab00a26ce..489d52d3b8 100644
--- a/indra/newview/skins/default/xui/it/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/it/floater_settings_debug.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="settings_debug" title="PARAMETRI DI DEBUG">
<radio_group name="boolean_combo">
- <radio_item label="VERO" name="TRUE" value="vero"/>
- <radio_item label="FALSO" name="FALSE" value=""/>
+ <radio_item label="VERO" name="TRUE" />
+ <radio_item label="FALSO" name="FALSE" />
</radio_group>
<color_swatch label="Colore" name="val_color_swatch"/>
<spinner label="x" name="val_spinner_1"/>
diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml
index a6691fb764..ff22221aab 100644
--- a/indra/newview/skins/default/xui/ja/strings.xml
+++ b/indra/newview/skins/default/xui/ja/strings.xml
@@ -3821,7 +3821,7 @@ www.secondlife.com から最新バージョンをダウンロードしてくだ
アドホックコンファレンス
</string>
<string name="conference-title-incoming">
- [AGENT_NAME]とコンファレンスする
+ [AGENT_NAME] とコンファレンスする
</string>
<string name="inventory_item_offered-im">
持ち物アイテムを送りました
diff --git a/indra/newview/skins/default/xui/pl/floater_settings_debug.xml b/indra/newview/skins/default/xui/pl/floater_settings_debug.xml
index 7c29d52e7b..131f92d56f 100644
--- a/indra/newview/skins/default/xui/pl/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/pl/floater_settings_debug.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="settings_debug" title="USTAWIENIA DEBUGOWANIA">
<radio_group name="boolean_combo">
- <radio_item label="PRAWDA" name="TRUE" value="prawda"/>
- <radio_item label="NIEPRAWDA" name="FALSE" value=""/>
+ <radio_item label="PRAWDA" name="TRUE" />
+ <radio_item label="NIEPRAWDA" name="FALSE" />
</radio_group>
<color_swatch label="Kolor" name="val_color_swatch"/>
<spinner label="x" name="val_spinner_1"/>
diff --git a/indra/newview/skins/default/xui/pt/floater_settings_debug.xml b/indra/newview/skins/default/xui/pt/floater_settings_debug.xml
index c6694d13b2..83f7b24572 100644
--- a/indra/newview/skins/default/xui/pt/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/pt/floater_settings_debug.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="settings_debug" title="DEBUG SETTINGS">
<radio_group name="boolean_combo">
- <radio_item label="TRUE" name="TRUE" value="verdadeiro"/>
- <radio_item label="FALSE" name="FALSE" value=""/>
+ <radio_item label="TRUE" name="TRUE" />
+ <radio_item label="FALSE" name="FALSE" />
</radio_group>
<color_swatch label="Cor" name="val_color_swatch"/>
<spinner label="x" name="val_spinner_1"/>
diff --git a/scripts/gpu_table_tester b/scripts/gpu_table_tester
index 52b1c8f31d..52b1c8f31d 100755..100644
--- a/scripts/gpu_table_tester
+++ b/scripts/gpu_table_tester