From bb1d94ba0ea3b7d910e69022fe4db55d8991dcfd Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Fri, 20 Apr 2012 17:26:44 -0400 Subject: [PATCH 01/15] Fix ambiguous overload in llstartup.cpp so the viewer compiles on linux --- indra/newview/llstartup.cpp | 50 ++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index c5d3ee9cd..a1fad9902 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1435,10 +1435,10 @@ bool idle_startup() { case LLUserAuth::E_OK: response = LLUserAuth::getInstance()->getResponse(); - login_response = response["login"]; - reason_response = response["reason"]; - message_response = response["message"]; - message_id = response["message_id"]; + login_response = response["login"].asString(); + reason_response = response["reason"].asString(); + message_response = response["message"].asString(); + message_id = response["message_id"].asString(); if(login_response == "true") { @@ -4293,45 +4293,45 @@ bool process_login_success_response(std::string& password) // Override grid info with anything sent in the login response - std::string tmp = response["gridname"]; + std::string tmp = response["gridname"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setGridName(tmp); - tmp = response["loginuri"]; + tmp = response["loginuri"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginUri(tmp); - tmp = response["welcome"]; + tmp = response["welcome"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginPage(tmp); - tmp = response["loginpage"]; + tmp = response["loginpage"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginPage(tmp); - tmp = response["economy"]; + tmp = response["economy"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setHelperUri(tmp); - tmp = response["helperuri"]; + tmp = response["helperuri"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setHelperUri(tmp); - tmp = response["about"]; + tmp = response["about"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setWebSite(tmp); - tmp = response["website"]; + tmp = response["website"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setWebSite(tmp); - tmp = response["help"]; + tmp = response["help"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSupportUrl(tmp); - tmp = response["support"]; + tmp = response["support"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSupportUrl(tmp); - tmp = response["register"]; + tmp = response["register"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRegisterUrl(tmp); - tmp = response["account"]; + tmp = response["account"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRegisterUrl(tmp); - tmp = response["password"]; + tmp = response["password"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setPasswordUrl(tmp); - tmp = response["search"]; + tmp = response["search"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSearchUrl(tmp); - tmp = response["currency"]; + tmp = response["currency"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setCurrencySymbol(tmp); - tmp = response["real_currency"]; + tmp = response["real_currency"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRealCurrencySymbol(tmp); - tmp = response["directory_fee"]; + tmp = response["directory_fee"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setDirectoryFee(atoi(tmp.c_str())); - tmp = response["max_groups"]; + tmp = response["max_groups"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setMaxAgentGroups(atoi(tmp.c_str())); - tmp = response["max-agent-groups"]; + tmp = response["max-agent-groups"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setMaxAgentGroups(atoi(tmp.c_str())); - tmp = response["VoiceConnector"]; + tmp = response["VoiceConnector"].asString(); if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setVoiceConnector(tmp); gHippoGridManager->saveFile(); gHippoLimits->setLimits(); @@ -4351,4 +4351,4 @@ bool process_login_success_response(std::string& password) success = true; } return success; -} \ No newline at end of file +} From d03b7d052d6aa0ab1808baea803da99a13f98c65 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Sat, 21 Apr 2012 14:02:11 -0400 Subject: [PATCH 02/15] Added EnableGestureSoundsSelf to allow playing the user's gesture sounds even while EnableGestureSounds is false. --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llviewermessage.cpp | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 5a877e72a..49399a111 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5073,6 +5073,17 @@ Value 1 + EnableGestureSoundsSelf + + Comment + Play sounds from your gestures when EnableGestureSounds is false. (Useless otherewise) + Persist + 1 + Type + Boolean + Value + 1 + EnableMouselook Comment diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 63a71f5fb..110876bad 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4853,7 +4853,9 @@ void process_sound_trigger(LLMessageSystem *msg, void **) // Don't play sounds from gestures if they are not enabled. if (object_id == owner_id && !gSavedSettings.getBOOL("EnableGestureSounds")) { - return; + // Don't mute own gestures, if they're not muted. + if(owner_id != gAgent.getID() || !gSavedSettings.getBOOL("EnableGestureSoundsSelf")) + return; } // From 37d2e41618a270bac94d7ba4a1633a2f144b297b Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Wed, 25 Apr 2012 05:00:02 -0400 Subject: [PATCH 03/15] Spelling fix. appearance isn't spelled appearence --- indra/newview/llagent.cpp | 2 +- indra/newview/llviewerstats.cpp | 2 +- indra/newview/skins/default/xui/en-us/notifications.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 2f878c450..34c4d85ac 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -4047,7 +4047,7 @@ void LLAgent::sendAgentSetAppearance() llinfos << "Avatar XML num VisualParams transmitted = " << transmitted_params << llendl; if(transmitted_params < 218) { - LLNotificationsUtil::add("SGIncompleteAppearence"); + LLNotificationsUtil::add("SGIncompleteAppearance"); } sendReliableMessage(); } diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index a94b76585..4166cc5f2 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -89,7 +89,7 @@ const StatAttributes STAT_INFO[LLViewerStats::ST_COUNT] = // ST_VERSION StatAttributes("Version", TRUE, FALSE), // ST_AVATAR_EDIT_SECONDS - StatAttributes("Seconds in Edit Appearence", FALSE, TRUE), + StatAttributes("Seconds in Edit Appearance", FALSE, TRUE), // ST_TOOLBOX_SECONDS StatAttributes("Seconds using Toolbox", FALSE, TRUE), // ST_CHAT_COUNT diff --git a/indra/newview/skins/default/xui/en-us/notifications.xml b/indra/newview/skins/default/xui/en-us/notifications.xml index caee8473d..afe01bfd4 100644 --- a/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/indra/newview/skins/default/xui/en-us/notifications.xml @@ -7214,9 +7214,9 @@ Click 'Wear' to attach the Physics Wearable, or click 'Cancel' if you wish to ma -Sending incomplete appearence. You may appear to others as a cloud. +Sending incomplete appearance. You may appear to others as a cloud. Your shape, skin, hair or eyes might be defect. Date: Thu, 26 Apr 2012 22:09:58 -0400 Subject: [PATCH 04/15] Fritigern's script updates, brought in! Also more stray spaces removed with care~ --- .../lscript_library/lscript_library.cpp | 42 +++++- indra/newview/app_settings/keywords.ini | 117 +++++++++++++++ .../skins/default/xui/en-us/strings.xml | 140 ++++++++++++++++++ 3 files changed, 295 insertions(+), 4 deletions(-) diff --git a/indra/lscript/lscript_library/lscript_library.cpp b/indra/lscript/lscript_library/lscript_library.cpp index 919fb758c..117c9d1ed 100644 --- a/indra/lscript/lscript_library/lscript_library.cpp +++ b/indra/lscript/lscript_library/lscript_library.cpp @@ -487,10 +487,34 @@ void LLScriptLibrary::init() addFunction(10.f, 0.f, dummy_func, "llSetContentType", NULL, "ki"); addFunction(10.f, 0.f, dummy_func, "llLinkSitTarget", NULL, "ivr"); addFunction(10.f, 0.f, dummy_func, "llAvatarOnLinkSitTarget", "k", "i"); - /* No info on these new functions yet.... - * addFunction(10.f, 0.f, dummy_func, "llSetVelocity", "", ""); - * addFunction(10.f, 0.f, dummy_func, "llSetRotationalVelocity", "", ""); - */ + addFunction(10.f, 0.f, dummy_func, "llGetMassMKS", "f", NULL); + addFunction(10.f, 0.f, dummy_func, "llGetMemoryLimit", "i", NULL); + addFunction(10.f, 0.f, dummy_func, "llGetParcelMusicURL", "s", NULL); + addFunction(10.f, 0.f, dummy_func, "llGetPhysicsMaterial", "l", NULL); + addFunction(10.f, 0.f, dummy_func, "llManageEstateAccess", "i", "ik"); + addFunction(10.f, 0.f, dummy_func, "llSetAngularVelocity", NULL, "vi"); + addFunction(10.f, 0.f, dummy_func, "llSetKeyframedMotion", NULL, "ll"); + addFunction(10.f, 0.f, dummy_func, "llSetPhysicsMaterial", NULL, "iffff"); + addFunction(10.f, 0.f, dummy_func, "llSetRegionPos", "i", "v"); + addFunction(10.f, 0.f, dummy_func, "llSetVelocity", NULL, "vi"); + addFunction(10.f, 0.f, dummy_func, "llTransferLindenDollars", "k", "ki"); + + + //Pathfinder functions. Current state: alpha, thus subject to change. + //This and the preceding line are to be removed in future revisions of this file. + addFunction(10.f, 0.f, dummy_func, "llCreateCharacter", NULL, "l"); + addFunction(10.f, 0.f, dummy_func, "llDeleteCharacter", NULL, NULL); + addFunction(10.f, 0.f, dummy_func, "llEvade", NULL, "kl"); + addFunction(10.f, 0.f, dummy_func, "llExecCharacterCmd", NULL, "il"); + addFunction(10.f, 0.f, dummy_func, "llGetClosestNavPoint", "l", "vl"); + addFunction(10.f, 0.f, dummy_func, "llFleeFrom", NULL, "vfl"); + addFunction(10.f, 0.f, dummy_func, "llNavigateTo", NULL, "vl"); + addFunction(10.f, 0.f, dummy_func, "llPatrolPoints", NULL, "ll"); + addFunction(10.f, 0.f, dummy_func, "llPursue", NULL, "kl"); + addFunction(10.f, 0.f, dummy_func, "llUpdateCharacter", NULL, "l"); + addFunction(10.f, 0.f, dummy_func, "llWanderWithin", NULL, "vfl"); + + // REGARDING OSSL FUNCTIONS // These additions should be posted underneath the llFunctions @@ -624,6 +648,16 @@ void LLScriptLibrary::init() addFunction(10.f, 0.f, dummy_func, "osNpcGetPos", "v", "k"); addFunction(10.f, 0.f, dummy_func, "osNpcStopMoveToTarget", NULL, "k"); + addFunction(10.f, 0.f, dummy_func, "osIsNpc", "i", "k"); + addFunction(10.f, 0.f, dummy_func, "osNpcGetOwner", "k", "k"); + addFunction(10.f, 0.f, dummy_func, "osGetGridCustom", "s", "s"); + addFunction(10.f, 0.f, dummy_func, "osGetGridHomeURI", "s", NULL); + addFunction(10.f, 0.f, dummy_func, "osNpcPlayAnimation", NULL, "ks"); + addFunction(10.f, 0.f, dummy_func, "osNpcSit", NULL, "kki"); + addFunction(10.f, 0.f, dummy_func, "osNpcStand", NULL, "k"); + addFunction(10.f, 0.f, dummy_func, "osNpcStopAnimation", NULL, "ks"); + addFunction(10.f, 0.f, dummy_func, "osSetRot", NULL, "kq"); + } LLScriptLibraryFunction::LLScriptLibraryFunction(F32 eu, F32 st, void (*exec_func)(LLScriptLibData *, LLScriptLibData *, const LLUUID &), const char *name, const char *ret_type, const char *args, BOOL god_only) diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index 455dc9e88..7b38b2a34 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -51,6 +51,8 @@ changed changed( integer change ):Triggered various event change the task:(tes remote_data remote_data(integer event_type, key channel, key message_id, string sender,integer idata, string sdata):Triggered by various XML-RPC calls (event_type will be one of REMOTE_DATA_CHANNEL, REMOTE_DATA_REQUEST, REMOTE_DATA_REPLY) http_response http_response(key request_id, integer status, list metadata, string body):Triggered when task receives a response to one of its llHTTPRequests http_request http_request(key id, string method, string body):Triggered when task receives an http request against a public URL +transaction_result transaction_result(key id, integer success, string data):Triggered when task receives asynchronous data. +path_update path_update(integer type, list reserved):Triggered when the state of a pathfinder character changes. Note; "list reserved" is not currently used # integer constants [word .1, .1, .5] @@ -605,6 +607,121 @@ WL_CLOUD_SCROLL_Y_LOCK Windlight Cloud Scroll Y Lock WL_CLOUD_SCROLL_X_LOCK Windlight Cloud Scroll X Lock WL_DRAW_CLASSIC_CLOUDS Windlight Draw Classic Clouds +# OSSL constants +STATS_TIME_DILATION +STATS_SIM_FPS +STATS_PHYSICS_FPS +STATS_AGENT_UPDATES +STATS_ROOT_AGENTS +STATS_CHILD_AGENTS +STATS_TOTAL_PRIMS +STATS_ACTIVE_PRIMS +STATS_FRAME_MS +STATS_NET_MS +STATS_PHYSICS_MS +STATS_IMAGE_MS +STATS_OTHER_MS +STATS_IN_PACKETS_PER_SECOND +STATS_OUT_PACKETS_PER_SECOND +STATS_UNACKED_BYTES +STATS_AGENT_MS +STATS_PENDING_DOWNLOADS +STATS_PENDING_UPLOADS +STATS_ACTIVE_SCRIPTS +STATS_SCRIPT_LPS + +## Constants for osNpc* functions +NPC +OS_NPC_CREATOR_OWNED +OS_NPC_NOT_OWNED +OS_NPC_SENSE_AS_AGENT +OS_NPC_FLY +OS_NPC_NO_FLY +OS_NPC_LAND_AT_TARGET +OS_NPC_SIT_NOW + +## Missing LSL constants (from http://wiki.secondlife.com/wiki/Category:LSL_Constants) +## Adding now, sorting later +ATTACH_HUD_BOTTOM +ATTACH_HUD_BOTTOM_LEFT +ATTACH_HUD_BOTTOM_RIGHT +ATTACH_HUD_CENTER_1 +ATTACH_HUD_CENTER_2 +ATTACH_HUD_TOP_CENTER +ATTACH_HUD_TOP_LEFT +ATTACH_HUD_TOP_RIGHT +ATTACH_LEFT_PEC +ATTACH_RIGHT_PEC +HTTP_VERBOSE_THROTTLE +OBJECT_PRIM_EQUIVALENCE +PARCEL_MEDIA_COMMAND_LOOP_SET +PRIM_LINK_TARGET +PRIM_OMEGA +PRIM_PHYSICS_MATERIAL +PRIM_PHYSICS_SHAPE_TYPE +PRIM_POS_LOCAL +PRIM_ROT_LOCAL +PROFILE_NONE +PROFILE_SCRIPT_MEMORY +RCERR_CAST_TIME_EXCEEDED +RCERR_SIM_PERF_LOW +RCERR_UNKNOWN +RC_DATA_FLAGS +RC_DETECT_PHANTOM +RC_GET_LINK_NUM +RC_GET_NORMAL +RC_GET_ROOT_KEY +RC_MAX_HITS +RC_REJECT_AGENTS +RC_REJECT_LAND +RC_REJECT_NONPHYSICAL +RC_REJECT_PHYSICAL +RC_REJECT_TYPES +STATUS_BLOCK_GRAB_OBJECT + +#Even more missing constants, thanks to Justin Clark Casey for pointing me into the right direction + +CAMERA_FOCUS_OFFSET_X +CAMERA_FOCUS_OFFSET_Y +CAMERA_FOCUS_OFFSET_Z +CAMERA_FOCUS_X +CAMERA_FOCUS_Y +CAMERA_FOCUS_Z +CAMERA_POSITION_X +CAMERA_POSITION_Y +CAMERA_POSITION_Z +CHANGED_ANIMATION +CHANGED_REGION_RESTART +DATA_SIM_RELEASE +ESTATE_ACCESS_ALLOWED_AGENT_ADD +ESTATE_ACCESS_ALLOWED_AGENT_REMOVE +ESTATE_ACCESS_ALLOWED_GROUP_ADD +ESTATE_ACCESS_ALLOWED_GROUP_REMOVE +ESTATE_ACCESS_BANNED_AGENT_ADD +ESTATE_ACCESS_BANNED_AGENT_REMOVE +LIST_STAT_HARMONIC_MEAN +PARCEL_DETAILS_CLAIMDATE +PERMISSION_CHANGE_JOINTS +PERMISSION_CHANGE_PERMISSIONS +PERMISSION_RELEASE_OWNERSHIP +PERMISSION_REMAP_CONTROLS +VEHICLE_FLAG_LOCK_HOVER_HEIGHT +VEHICLE_FLAG_LOCK_ROTATION +VEHICLE_FLAG_NO_DEFLECTION +VEHICLE_FLAG_NO_X +VEHICLE_FLAG_NO_Y +VEHICLE_FLAG_NO_Z +VEHICLE_RANGE_BLOCK +VEHICLE_ROLL_FRAME +LSL_STATUS_BOUNDS_ERROR +LSL_STATUS_INTERNAL_ERROR +LSL_STATUS_MALFORMED_PARAMS +LSL_STATUS_NOT_FOUND +LSL_STATUS_NOT_SUPPORTED +LSL_STATUS_OK +LSL_STATUS_TYPE_MISMATCH +LSL_STATUS_WHITELIST_FAILED + # string constants [word .1, .3, .5] NULL_KEY Indicates an empty key diff --git a/indra/newview/skins/default/xui/en-us/strings.xml b/indra/newview/skins/default/xui/en-us/strings.xml index d55f9e389..f9cded1b0 100644 --- a/indra/newview/skins/default/xui/en-us/strings.xml +++ b/indra/newview/skins/default/xui/en-us/strings.xml @@ -2524,4 +2524,144 @@ Sets value of param property for plugin module. (OpenSim only.) (Unnamed) + +float llGetMassMKS() +Returns a float that is the mass (in +Kilograms) of the object that the +script is attached to. + + +integer llGetMemoryLimit() +Get the maximum memory a script can use. + + +string llGetParcelMusicURL() +Returns a string containing the parcel streaming audio URL. +The object owner must also be the land owner. + + +list llGetPhysicsMaterial() +Used to get the physical characteristics of an object. +Returns a list in the form [ float gravity_multiplier, float restitution, float friction, float density ] + + +integer llManageEstateAccess(integer action, key avatar) +Used to add or remove agents from the estate's agent access or ban lists or groups from the estate's group access list. + + +llSetAngularVelocity(vector force, integer local) +Applies rotational velocity to object. + + +llSetKeyframedMotion(list keyframes, list options) +Specify a list of times, positions, and orientations to be followed by an object. The object will be smoothly moved between keyframes by the simulator. + + +llSetPhysicsMaterial(integer material, float gravity, +float restitution, float friction, float density) +Used for setting the physical characteristics of an object. + + +integer llSetRegionPos(vector position) +Tries to move the entire object so that the root prim is within 0.1m of position + + +llSetVelocity(vector force, integer local) +Applies velocity to an object + + +key llTransferLindenDollars(key destination, integer amount) +Transfer amount of L$ money from script owner to destination avatar. + + + + +llCreateCharacter(list options) +Creates a pathfinding entity, known as a "character" from the object containing the script. + + +llDeleteCharacter() +Convert the current linkset back to a standard object, removing all pathfinding properties. + + +llEvade(key target, list options) +Characters will try to hide from their pursuers if there is a good hiding spot along their fleeing path. + + +llExecCharacterCmd(integer command, list options) +Send a command to the pathing system. + + +list llGetClosestNavPoint(vector point, list options) +Finds the closest navpoint and returns a list with a single vector if succesful. Returns empty list when no navpoints found. + + +llFleeFrom(vector source, float distance, list options) +Tells an object to keep away from a defined position in the region or adjacent regions. + + +llNavigateTo(vector pos, list options) +Tells an object to travel to a defined position in the region or adjacent regions. + + +llPatrolPoints(list patrolPoints, list options) +Sets the object patrolling between the points specified in patrolPoints. + + +llPursue(key target, list options) +Causes the object to pursue a target. + + +llUpdateCharacter(list options) +Updates settings for a character. + + +llWanderWithin(vector origin, float dist, list options) +Sets a character to wander about a central spot within a specified radius. + + +integer osIsNpc(key npc) +Returns TRUE if the given key is an NPC, false otherwise. +(OpenSim only.) + + +key osNpcGetOwner(key npc) +Return the owner key of the given NPC. If the NPC is unowned or the input key does not belong to an NPC then it returns NULL_KEY. +(OpenSim only.) + + +string osGetGridCustom(string key) +Reads configuration strings from the [GridInfo] setion in OpenSim.ini. +(OpenSim only.) + + +string osGetGridHomeURI() +Returns the hypergrid URI of the grid where the user logged in. +(OpenSim only.) + + +osNpcPlayAnimation(key npc, string animation) +Get an NPC to play an animation. The animation can either be a key or the name of an animation in the same object as the script. +(OpenSim only.) + + +osNpcSit(key npc, key target, integer options) +Sit an NPC on a prim target. No options have been implemented yet, so always input 0. +(OpenSim only.) + + +osNpcStand(key npc) +Make an NPC stand up. +(OpenSim only.) + + +osNpcStopAnimation(key npc, string animation) +Get an NPC to stop playing an animation. The animation can either be a key or the name of an animation in the same inventory as the script. +(OpenSim only.) + + +osSetRot(key target, quaternion rotation) +Rotates an object or avatar. +(OpenSim only.) + From 8e6063e7b9a3e8131c7446be6bd9b92f66983b3b Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Sat, 28 Apr 2012 21:29:52 -0400 Subject: [PATCH 05/15] Fixed compile errors for gcc4.7 (also reported by clang) --- indra/llmath/lloctree.h | 16 ++++++++-------- indra/llmessage/llcurl.cpp | 6 +++--- indra/llmessage/llcurl.h | 6 +++--- indra/llmessage/lliopipe.h | 10 +++++----- indra/llmessage/llregionpresenceverifier.cpp | 6 +++--- indra/llmessage/llregionpresenceverifier.h | 6 +++--- indra/llmessage/net.cpp | 1 + indra/llrender/llvertexbuffer.h | 1 + indra/llui/lldelayeduidelete.h | 1 + indra/llxuixml/llinitparam.h | 10 +++++----- indra/newview/llsurfacepatch.cpp | 4 ++-- 11 files changed, 35 insertions(+), 32 deletions(-) diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h index 017d48a0e..b13eddc4e 100644 --- a/indra/llmath/lloctree.h +++ b/indra/llmath/lloctree.h @@ -416,7 +416,7 @@ public: { //we have data mData.erase(data); mElementCount = mData.size(); - notifyRemoval(data); + this->notifyRemoval(data); checkAlive(); return true; } @@ -454,7 +454,7 @@ public: { mData.erase(data); mElementCount = mData.size(); - notifyRemoval(data); + this->notifyRemoval(data); llwarns << "FOUND!" << llendl; checkAlive(); return; @@ -663,7 +663,7 @@ public: //(don't notify listeners of addition) for (U32 i = 0; i < child->getChildCount(); i++) { - addChild(child->getChild(i), TRUE); + this->addChild(child->getChild(i), TRUE); } //destroy child @@ -707,10 +707,10 @@ public: return false; } - if (this->getSize()[0] > data->getBinRadius() && isInside(data->getPositionGroup())) + if (this->getSize()[0] > data->getBinRadius() && this->isInside(data->getPositionGroup())) { //we got it, just act like a branch - oct_node* node = getNodeAt(data); + oct_node* node = this->getNodeAt(data); if (node == this) { LLOctreeNode::insert(data); @@ -723,7 +723,7 @@ public: else if (this->getChildCount() == 0) { //first object being added, just wrap it up - while (!(this->getSize()[0] > data->getBinRadius() && isInside(data->getPositionGroup()))) + while (!(this->getSize()[0] > data->getBinRadius() && this->isInside(data->getPositionGroup()))) { LLVector4a center, size; center = this->getCenter(); @@ -738,7 +738,7 @@ public: } else { - while (!(this->getSize()[0] > data->getBinRadius() && isInside(data->getPositionGroup()))) + while (!(this->getSize()[0] > data->getBinRadius() && this->isInside(data->getPositionGroup()))) { //the data is outside the root node, we need to grow LLVector4a center(this->getCenter()); @@ -764,7 +764,7 @@ public: //clear our children and add the root copy this->clearChildren(); - addChild(newnode); + this->addChild(newnode); } //insert the data diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index ccefdb56c..b2f5ce471 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -202,8 +202,8 @@ void LLCurl::Responder::completedHeader(U32 status, const std::string& reason, c } -namespace boost -{ +//namespace boost +//{ void intrusive_ptr_add_ref(LLCurl::Responder* p) { ++p->mReferenceCount; @@ -216,7 +216,7 @@ namespace boost delete p; } } -}; +//}; ////////////////////////////////////////////////////////////////////////////// diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h index 1609530a3..fa8465bfe 100644 --- a/indra/llmessage/llcurl.h +++ b/indra/llmessage/llcurl.h @@ -378,11 +378,11 @@ private: void cleanupMulti(LLCurl::Multi* multi) ; } ; -namespace boost -{ +//namespace boost +//{ void intrusive_ptr_add_ref(LLCurl::Responder* p); void intrusive_ptr_release(LLCurl::Responder* p); -}; +//}; class LLCurlRequest diff --git a/indra/llmessage/lliopipe.h b/indra/llmessage/lliopipe.h index cbd17b5a3..884089e97 100644 --- a/indra/llmessage/lliopipe.h +++ b/indra/llmessage/lliopipe.h @@ -250,13 +250,13 @@ protected: LLPumpIO* pump) = 0; private: - friend void boost::intrusive_ptr_add_ref(LLIOPipe* p); - friend void boost::intrusive_ptr_release(LLIOPipe* p); + friend void /*boost::*/intrusive_ptr_add_ref(LLIOPipe* p); + friend void /*boost::*/intrusive_ptr_release(LLIOPipe* p); U32 mReferenceCount; }; -namespace boost -{ +//namespace boost +//{ inline void intrusive_ptr_add_ref(LLIOPipe* p) { ++p->mReferenceCount; @@ -268,7 +268,7 @@ namespace boost delete p; } } -}; +//}; #if 0 diff --git a/indra/llmessage/llregionpresenceverifier.cpp b/indra/llmessage/llregionpresenceverifier.cpp index 932cbf375..01d78ed3e 100644 --- a/indra/llmessage/llregionpresenceverifier.cpp +++ b/indra/llmessage/llregionpresenceverifier.cpp @@ -32,8 +32,8 @@ #include "net.h" #include "message.h" -namespace boost -{ +//namespace boost +//{ void intrusive_ptr_add_ref(LLRegionPresenceVerifier::Response* p) { ++p->mReferenceCount; @@ -46,7 +46,7 @@ namespace boost delete p; } } -}; +//}; LLRegionPresenceVerifier::Response::~Response() { diff --git a/indra/llmessage/llregionpresenceverifier.h b/indra/llmessage/llregionpresenceverifier.h index 5e8251e51..9b45e78b5 100644 --- a/indra/llmessage/llregionpresenceverifier.h +++ b/indra/llmessage/llregionpresenceverifier.h @@ -89,10 +89,10 @@ public: }; }; -namespace boost -{ +//namespace boost +//{ void intrusive_ptr_add_ref(LLRegionPresenceVerifier::Response* p); void intrusive_ptr_release(LLRegionPresenceVerifier::Response* p); -}; +//}; #endif //LL_LLREGIONPRESENCEVERIFIER_H diff --git a/indra/llmessage/net.cpp b/indra/llmessage/net.cpp index 85aef5da0..6e232aa24 100644 --- a/indra/llmessage/net.cpp +++ b/indra/llmessage/net.cpp @@ -36,6 +36,7 @@ #include #include #else + #include #include #include #include diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h index ceaa70c3b..0ab73af1d 100644 --- a/indra/llrender/llvertexbuffer.h +++ b/indra/llrender/llvertexbuffer.h @@ -90,6 +90,7 @@ class LLGLFence public: virtual void placeFence() = 0; virtual void wait() = 0; + virtual ~LLGLFence() {} }; //============================================================================ diff --git a/indra/llui/lldelayeduidelete.h b/indra/llui/lldelayeduidelete.h index 043e6972e..131e43424 100644 --- a/indra/llui/lldelayeduidelete.h +++ b/indra/llui/lldelayeduidelete.h @@ -7,6 +7,7 @@ class LLDeleteJob { public: virtual BOOL work(U32& completed); + virtual ~LLDeleteJob() {} }; class LLViewDeleteJob : public LLDeleteJob { diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h index ab2095776..7285d3c48 100644 --- a/indra/llxuixml/llinitparam.h +++ b/indra/llxuixml/llinitparam.h @@ -838,7 +838,7 @@ namespace LLInitParam BaseBlock::addParam(block_descriptor, param_descriptor, name); } - setValue(value); + this->setValue(value); } bool isProvided() const { return Param::anyProvided(); } @@ -926,7 +926,7 @@ namespace LLInitParam void set(value_assignment_t val, bool flag_as_provided = true) { param_value_t::clearValueName(); - setValue(val); + this->setValue(val); setProvided(flag_as_provided); } @@ -1068,7 +1068,7 @@ namespace LLInitParam // assign block contents to this param-that-is-a-block void set(value_assignment_t val, bool flag_as_provided = true) { - setValue(val); + this->setValue(val); param_value_t::clearValueName(); // force revalidation of block // next call to isProvided() will update provision status based on validity @@ -1723,7 +1723,7 @@ namespace LLInitParam Optional& operator =(value_assignment_t val) { - set(val); + this->set(val); return *this; } @@ -1752,7 +1752,7 @@ namespace LLInitParam Mandatory& operator =(value_assignment_t val) { - set(val); + this->set(val); return *this; } diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp index 06431d428..0b8e4c608 100644 --- a/indra/newview/llsurfacepatch.cpp +++ b/indra/newview/llsurfacepatch.cpp @@ -236,8 +236,8 @@ void LLSurfacePatch::eval(const U32 x, const U32 y, const U32 stride, LLVector3 const F32 xyScaleInv = (1.f / xyScale)*(0.2222222222f); F32 vec[3] = { - fmod((F32)(mOriginGlobal.mdV[0] + x)*xyScaleInv, 256.f), - fmod((F32)(mOriginGlobal.mdV[1] + y)*xyScaleInv, 256.f), + (F32)fmod((mOriginGlobal.mdV[0] + x)*xyScaleInv, 256.f), + (F32)fmod((mOriginGlobal.mdV[1] + y)*xyScaleInv, 256.f), 0.f }; F32 rand_val = llclamp(noise2(vec)* 0.75f + 0.5f, 0.f, 1.f); From 16c22355107d4a3dfc595123492e8e76fb683e3b Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Sat, 28 Apr 2012 21:34:24 -0400 Subject: [PATCH 06/15] Fixed About Floater's background. clear and transparent both refer to the same thing, code fix to reflect this. --- indra/llmath/v4color.cpp | 4 ++-- indra/newview/skins/default/xui/en-us/floater_about.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/llmath/v4color.cpp b/indra/llmath/v4color.cpp index 219b06ec7..660f59fbe 100644 --- a/indra/llmath/v4color.cpp +++ b/indra/llmath/v4color.cpp @@ -704,9 +704,9 @@ BOOL LLColor4::parseColor(const std::string& buf, LLColor4* color) { color->set(LLColor4::orange6); } - else if ( "clear" == color_name ) + else if ( "clear" == color_name || "transparent" == color_name ) { - color->set(0.f, 0.f, 0.f, 0.f); + color->set(LLColor4::transparent); } else { diff --git a/indra/newview/skins/default/xui/en-us/floater_about.xml b/indra/newview/skins/default/xui/en-us/floater_about.xml index 9fd019310..0f35260c8 100644 --- a/indra/newview/skins/default/xui/en-us/floater_about.xml +++ b/indra/newview/skins/default/xui/en-us/floater_about.xml @@ -22,7 +22,7 @@ follows="top|left" font="SansSerif" height="343" - bg_readonly_color="Transparent" + bg_readonly_color="transparent" left="1" max_length="65536" name="support_editor" @@ -49,7 +49,7 @@ Date: Sun, 29 Apr 2012 00:25:40 -0400 Subject: [PATCH 07/15] Few more GCC 4.7 fixes. include unistd when not on windows. --- indra/llcommon/llfile.cpp | 2 ++ indra/llcommon/llprocesslauncher.cpp | 1 + indra/llmessage/lliopipe.h | 6 +++--- indra/llmessage/tests/llcurl_stub.cpp | 6 +++--- indra/llvfs/llpidlock.cpp | 1 + indra/plugins/webkit/linux_volume_catcher.cpp | 3 +++ 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp index d3e97f5c1..0d8dce1eb 100644 --- a/indra/llcommon/llfile.cpp +++ b/indra/llcommon/llfile.cpp @@ -35,6 +35,8 @@ #if LL_WINDOWS #include +#else +#include #endif #include "linden_common.h" diff --git a/indra/llcommon/llprocesslauncher.cpp b/indra/llcommon/llprocesslauncher.cpp index 8ffd4b06d..8e146e035 100644 --- a/indra/llcommon/llprocesslauncher.cpp +++ b/indra/llcommon/llprocesslauncher.cpp @@ -42,6 +42,7 @@ #if LL_DARWIN || LL_LINUX // not required or present on Win32 #include +#include #endif LLProcessLauncher::LLProcessLauncher() diff --git a/indra/llmessage/lliopipe.h b/indra/llmessage/lliopipe.h index 884089e97..2def3229f 100644 --- a/indra/llmessage/lliopipe.h +++ b/indra/llmessage/lliopipe.h @@ -55,11 +55,11 @@ void pump_debug(const char *file, S32 line); /** * intrusive pointer support */ -namespace boost -{ +//namespace boost +//{ void intrusive_ptr_add_ref(LLIOPipe* p); void intrusive_ptr_release(LLIOPipe* p); -}; +//}; /** * @class LLIOPipe diff --git a/indra/llmessage/tests/llcurl_stub.cpp b/indra/llmessage/tests/llcurl_stub.cpp index d84fe0a49..de9725e8a 100644 --- a/indra/llmessage/tests/llcurl_stub.cpp +++ b/indra/llmessage/tests/llcurl_stub.cpp @@ -77,8 +77,8 @@ void LLCurl::Responder::result(LLSD const&) { } -namespace boost -{ +//namespace boost +//{ void intrusive_ptr_add_ref(LLCurl::Responder* p) { ++p->mReferenceCount; @@ -91,5 +91,5 @@ namespace boost delete p; } } -}; +//}; diff --git a/indra/llvfs/llpidlock.cpp b/indra/llvfs/llpidlock.cpp index 21cfa66a8..85d41b5d3 100644 --- a/indra/llvfs/llpidlock.cpp +++ b/indra/llvfs/llpidlock.cpp @@ -54,6 +54,7 @@ static bool isProcessAlive(U32 pid) } #else //Everyone Else +#include static U32 getPID() { return getpid(); diff --git a/indra/plugins/webkit/linux_volume_catcher.cpp b/indra/plugins/webkit/linux_volume_catcher.cpp index de5ce8dd5..0cb73ca1e 100644 --- a/indra/plugins/webkit/linux_volume_catcher.cpp +++ b/indra/plugins/webkit/linux_volume_catcher.cpp @@ -40,6 +40,9 @@ #include "volume_catcher.h" +#ifndef LL_WINDOWS +#include +#endif extern "C" { #include From e20b383aa04248b9662ff064b59cd8f8a99b6b0d Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Mon, 30 Apr 2012 23:48:30 -0400 Subject: [PATCH 08/15] Small changes that seem to make clang happier. --- indra/llui/llscrolllistctrl.cpp | 2 +- indra/newview/llface.cpp | 2 +- indra/newview/llinventorybridge.h | 2 ++ indra/newview/llviewermenu.cpp | 2 +- indra/newview/llviewerregion.cpp | 2 +- indra/newview/llxmlrpctransaction.cpp | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 8f0cc0c64..e4ad47118 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -2372,7 +2372,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) if (mCanSelect) { // Ignore capslock - mask = mask; + //mask = mask; //Why was this here? if (mask == MASK_NONE) { diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index f212da907..cd3c7812a 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1791,7 +1791,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, (glow << 24); U32 vec[4]; - vec[0] = vec[1] = vec[2] = vec[3] = glow32; + std::fill_n(vec,4,glow32); src.loadua((F32*) vec); diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 305d0649d..c3c883a42 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -178,6 +178,7 @@ class AIFilePicker; class LLInventoryFVBridgeBuilder { public: + LLInventoryFVBridgeBuilder() {} virtual ~LLInventoryFVBridgeBuilder() {} virtual LLInvFVBridge* createBridge(LLAssetType::EType asset_type, LLAssetType::EType actual_asset_type, @@ -627,6 +628,7 @@ public: class LLRecentInventoryBridgeBuilder : public LLInventoryFVBridgeBuilder { public: + LLRecentInventoryBridgeBuilder(): LLInventoryFVBridgeBuilder() {} // Overrides FolderBridge for Recent Inventory Panel. // It use base functionality for bridges other than FolderBridge. virtual LLInvFVBridge* createBridge(LLAssetType::EType asset_type, diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index dc4fb0b5a..15162e938 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9067,7 +9067,7 @@ class LLEditTakeOff : public view_listener_t && (gAgentWearables.getWearableCount(type) > 0)) { // MULTI-WEARABLES: assuming user wanted to remove top shirt. - U32 wearable_index = gAgentWearables.getWearableCount(type) - 1; + S32 wearable_index = gAgentWearables.getWearableCount(type) - 1; // [RLVa:KB] - Checked: 2010-06-09 (RLVa-1.2.0g) | Added: RLVa-1.2.0g if ( (rlv_handler_t::isEnabled()) && (gRlvWearableLocks.hasLockedWearable(type)) ) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 48fb69023..2e96edcb4 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1107,7 +1107,7 @@ public: } else if( i != you_index) { - U32 loc = x << 16 | y << 8 | z; loc = loc; + //U32 loc = x << 16 | y << 8 | z; //Unused variable, why did this exist? U32 pos = 0x0; pos |= x; pos <<= 8; diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index 159255078..af5e977b2 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -469,7 +469,7 @@ void LLXMLRPCTransaction::Impl::setCurlStatus(CURLcode code) case CURLE_SSL_CACERT: case CURLE_SSL_CONNECT_ERROR: message = - "Often this means that your computer\'s clock is set incorrectly.\n" + "Often this means that your computer's clock is set incorrectly.\n" "Please go to Control Panels and make sure the time and date\n" "are set correctly.\n" "\n" From 5a2d160ac44ac3f5a1a91c8e9d0ff105184549f9 Mon Sep 17 00:00:00 2001 From: Drake Arconis Date: Tue, 15 May 2012 10:36:48 -0400 Subject: [PATCH 09/15] Fixed FMOD Ex support under linux --- indra/llaudio/CMakeLists.txt | 24 +++--- indra/llaudio/llaudiodecodemgr.cpp | 4 +- indra/llaudio/llaudioengine.cpp | 6 +- indra/llaudio/llaudioengine_fmodex.cpp | 101 +++++++++++-------------- indra/llaudio/llvorbisencode.cpp | 2 +- indra/newview/CMakeLists.txt | 55 +++++++------- 6 files changed, 91 insertions(+), 101 deletions(-) diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index 44edde114..13cb932b6 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -5,27 +5,25 @@ project(llaudio) include(00-Common) include(Audio) include(LLAudio) -if(FMODEX) - include(FMODEX) - if(FMODEX) - set(FMOD OFF) - endif(FMODEX) -endif(FMODEX) -if(NOT FMODEX) - include(FMOD) -endif(NOT FMODEX) +if (FMODEX) + include(FMODEX) + set(FMOD OFF) +endif (FMODEX) +if (NOT FMODEX) + include(FMOD) +endif (NOT FMODEX) include(OPENAL) include(LLCommon) include(LLMath) include(LLMessage) include(LLVFS) -if(FMODEX) - include_directories(${FMODEX_INCLUDE_DIR}) +if (FMODEX) + include_directories(${FMODEX_INCLUDE_DIR}) endif(FMODEX) if(FMOD) - include_directories(${FMOD_INCLUDE_DIR}) -endif(FMOD) + include_directories(${FMOD_INCLUDE_DIR}) +endif (FMOD) include_directories( ${LLAUDIO_INCLUDE_DIRS} diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index 4350152ac..ec7d9b399 100644 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -242,8 +242,8 @@ BOOL LLVorbisDecodeState::initDecode() llwarns << "No default bitstream found" << llendl; } // - // This magic value is equivilent to 150MiB of data. - // Prevents griffers from utilizin a huge xbox sound the size of god to instafry the viewer + // This magic value is equivalent to 150MiB of data. + // Prevents griefers from utilizing a huge xbox sound the size of god to instafry the viewer if(size_guess >= 157286400) { llwarns << "Bad sound caught by zmagic" << llendl; diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index d696020bb..198ee8cf0 100644 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -1275,7 +1275,7 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E // Need to mark data as bad to avoid constant rerequests. LLAudioData *adp = gAudiop->getAudioData(uuid); if (adp) - { + { adp->setHasValidData(false); adp->setHasLocalData(false); adp->setHasDecodedData(false); @@ -1292,8 +1292,8 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E else { adp->setHasValidData(true); - adp->setHasLocalData(true); - gAudioDecodeMgrp->addDecodeRequest(uuid); + adp->setHasLocalData(true); + gAudioDecodeMgrp->addDecodeRequest(uuid); } } gAudiop->mCurrentTransfer = LLUUID::null; diff --git a/indra/llaudio/llaudioengine_fmodex.cpp b/indra/llaudio/llaudioengine_fmodex.cpp index a9592e1cd..185b40151 100644 --- a/indra/llaudio/llaudioengine_fmodex.cpp +++ b/indra/llaudio/llaudioengine_fmodex.cpp @@ -105,10 +105,6 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata) U32 version; FMOD_RESULT result; - int numdrivers; - FMOD_SPEAKERMODE speakermode; - FMOD_CAPS caps; - char name[256]; LL_DEBUGS("AppInit") << "LLAudioEngine_FMODEX::init() initializing FMOD" << LL_ENDL; @@ -124,11 +120,16 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata) if (version < FMOD_VERSION) { - LL_WARNS("AppInit") << "Error : You are using the wrong FMOD version (" << version - << ")! You should be using FMOD " << FMOD_VERSION << LL_ENDL; + LL_WARNS("AppInit") << "Error : You are using the wrong FMOD Ex version (" << version + << ")! You should be using FMOD Ex" << FMOD_VERSION << LL_ENDL; } #if LL_WINDOWS + int numdrivers; + FMOD_SPEAKERMODE speakermode; + FMOD_CAPS caps; + char name[256]; + //Is this block applicable to linux? { result = mSystem->getNumDrivers(&numdrivers); @@ -173,7 +174,7 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata) #endif //LL_WINDOWS // In this case, all sounds, PLUS wind and stream will be software. - result = mSystem->setSoftwareChannels(num_channels+2); + result = mSystem->setSoftwareChannels(num_channels + 2); Check_FMOD_Error(result,"FMOD::System::setSoftwareChannels"); U32 fmod_flags = FMOD_INIT_NORMAL; @@ -181,73 +182,67 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata) fmod_flags |= FMOD_INIT_ENABLE_PROFILE; #if LL_LINUX - // If we don't set an output method, Linux FMOD always - // decides on OSS and fails otherwise. So we'll manually - // try ESD, then OSS, then ALSA. - // Why this order? See SL-13250, but in short, OSS emulated - // on top of ALSA is ironically more reliable than raw ALSA. - // Ack, and ESD has more reliable failure modes - but has worse - // latency - than all of them, so wins for now. bool audio_ok = false; if (!audio_ok) { - if (NULL == getenv("LL_BAD_FMODEX_ESD")) /*Flawfinder: ignore*/ + if (NULL == getenv("LL_BAD_FMOD_PULSEAUDIO")) /*Flawfinder: ignore*/ { - LL_DEBUGS("AppInit") << "Trying ESD audio output..." << LL_ENDL; - if(mSystem->SetOutput(FMOD_OUTPUTTYPE_ESD) == FMOD_OK && - (result = mSystem->init(num_channels, fmod_flags, 0)) == FMOD_OK) + LL_DEBUGS("AppInit") << "Trying PulseAudio audio output..." << LL_ENDL; + if(mSystem->setOutput(FMOD_OUTPUTTYPE_PULSEAUDIO) == FMOD_OK && + (result = mSystem->init(num_channels + 2, fmod_flags, 0)) == FMOD_OK) { - LL_DEBUGS("AppInit") << "ESD audio output initialized OKAY" << LL_ENDL; + LL_DEBUGS("AppInit") << "PulseAudio output initialized OKAY" << LL_ENDL; audio_ok = true; } else { - Check_FMOD_Error(result, "ESD audio output FAILED to initialize"); + Check_FMOD_Error(result, "PulseAudio audio output FAILED to initialize"); } } else { - LL_DEBUGS("AppInit") << "ESD audio output SKIPPED" << LL_ENDL; + LL_DEBUGS("AppInit") << "PulseAudio audio output SKIPPED" << LL_ENDL; } } if (!audio_ok) { - if (NULL == getenv("LL_BAD_FMODEX_OSS")) /*Flawfinder: ignore*/ + if (NULL == getenv("LL_BAD_FMOD_ALSA")) /*Flawfinder: ignore*/ { - LL_DEBUGS("AppInit") << "Trying OSS audio output..." << LL_ENDL; - if(mSystem->SetOutput(FMOD_OUTPUTTYPE_OSS) == FMOD_OK && - (result = mSystem->init(num_channels, fmod_flags, 0)) == FMOD_OK) + LL_DEBUGS("AppInit") << "Trying ALSA audio output..." << LL_ENDL; + if(mSystem->setOutput(FMOD_OUTPUTTYPE_ALSA) == FMOD_OK && + (result = mSystem->init(num_channels + 2, fmod_flags, 0)) == FMOD_OK) { - LL_DEBUGS("AppInit") << "OSS audio output initialized OKAY" << LL_ENDL; + LL_DEBUGS("AppInit") << "ALSA audio output initialized OKAY" << LL_ENDL; audio_ok = true; } else { - Check_FMOD_Error(result, "OSS audio output FAILED to initialize" << LL_ENDL; + Check_FMOD_Error(result, "ALSA audio output FAILED to initialize"); } } else { - LL_DEBUGS("AppInit") << "OSS audio output SKIPPED" << LL_ENDL; + LL_DEBUGS("AppInit") << "ALSA audio output SKIPPED" << LL_ENDL; } } if (!audio_ok) { - if (NULL == getenv("LL_BAD_FMODEX_ALSA")) /*Flawfinder: ignore*/ + if (NULL == getenv("LL_BAD_FMOD_OSS")) /*Flawfinder: ignore*/ { - LL_DEBUGS("AppInit") << "Trying ALSA audio output..." << LL_ENDL; - if(mSystem->SetOutput(FMOD_OUTPUTTYPE_ALSA) && - (result = mSystem->init(num_channels, fmod_flags, 0)) == FMOD_OK) + LL_DEBUGS("AppInit") << "Trying OSS audio output..." << LL_ENDL; + if(mSystem->setOutput(FMOD_OUTPUTTYPE_OSS) == FMOD_OK && + (result = mSystem->init(num_channels + 2, fmod_flags, 0)) == FMOD_OK) { - LL_DEBUGS("AppInit") << "ALSA audio output initialized OKAY" << LL_ENDL; + LL_DEBUGS("AppInit") << "OSS audio output initialized OKAY" << LL_ENDL; audio_ok = true; } else { - Check_FMOD_Error(result, "ALSA audio output FAILED to initialize"); + Check_FMOD_Error(result, "OSS audio output FAILED to initialize"); } - } else + } + else { LL_DEBUGS("AppInit") << "OSS audio output SKIPPED" << LL_ENDL; } @@ -258,25 +253,20 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata) return false; } - // On Linux, FMOD causes a SIGPIPE for some netstream error - // conditions (an FMOD bug); ignore SIGPIPE so it doesn't crash us. - // NOW FIXED in FMOD 3.x since 2006-10-01. - //signal(SIGPIPE, SIG_IGN); - // We're interested in logging which output method we // ended up with, for QA purposes. FMOD_OUTPUTTYPE output_type; - mSystem->getOutput(output_type); + mSystem->getOutput(&output_type); switch (output_type) { - case FSOUND_OUTPUT_NOSOUND: - LL_DEBUGS("AppInit") << "Audio output: NoSound" << LL_ENDL; break; - case FSOUND_OUTPUT_OSS: - LL_DEBUGS("AppInit") << "Audio output: OSS" << LL_ENDL; break; - case FSOUND_OUTPUT_ESD: - LL_DEBUGS("AppInit") << "Audio output: ESD" << LL_ENDL; break; - case FSOUND_OUTPUT_ALSA: - LL_DEBUGS("AppInit") << "Audio output: ALSA" << LL_ENDL; break; + case FMOD_OUTPUTTYPE_NOSOUND: + LL_INFOS("AppInit") << "Audio output: NoSound" << LL_ENDL; break; + case FMOD_OUTPUTTYPE_PULSEAUDIO: + LL_INFOS("AppInit") << "Audio output: PulseAudio" << LL_ENDL; break; + case FMOD_OUTPUTTYPE_ALSA: + LL_INFOS("AppInit") << "Audio output: ALSA" << LL_ENDL; break; + case FMOD_OUTPUTTYPE_OSS: + LL_INFOS("AppInit") << "Audio output: OSS" << LL_ENDL; break; default: LL_INFOS("AppInit") << "Audio output: Unknown!" << LL_ENDL; break; }; @@ -297,7 +287,7 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata) */ result = mSystem->init(100, FMOD_INIT_NORMAL, 0); } - if(Check_FMOD_Error(result, "Error initializing FMOD")) + if(Check_FMOD_Error(result, "Error initializing FMOD Ex")) return false; #endif @@ -305,7 +295,7 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata) if (!getStreamingAudioImpl()) // no existing implementation added setStreamingAudioImpl(new LLStreamingAudio_FMODEX(mSystem)); - LL_DEBUGS("AppInit") << "LLAudioEngine_FMODEX::init() FMOD initialized correctly" << LL_ENDL; + LL_INFOS("AppInit") << "LLAudioEngine_FMODEX::init() FMOD Ex initialized correctly" << LL_ENDL; mInited = true; @@ -321,10 +311,10 @@ std::string LLAudioEngine_FMODEX::getDriverName(bool verbose) U32 version; if(!Check_FMOD_Error(mSystem->getVersion(&version), "FMOD::System::getVersion")) { - return llformat("FMOD version %1x.%02x.%02x", version >> 16, version >> 8 & 0x000000FF, version & 0x000000FF); + return llformat("FMOD Ex %1x.%02x.%02x", version >> 16, version >> 8 & 0x000000FF, version & 0x000000FF); } } - return "FMOD"; + return "FMODEx"; } @@ -342,12 +332,13 @@ void LLAudioEngine_FMODEX::shutdown() { stopInternetStream(); + llinfos << "About to LLAudioEngine::shutdown()" << llendl; LLAudioEngine::shutdown(); - llinfos << "LLAudioEngine_FMODEX::shutdown() closing FMOD" << llendl; + llinfos << "LLAudioEngine_FMODEX::shutdown() closing FMOD Ex" << llendl; mSystem->close(); mSystem->release(); - llinfos << "LLAudioEngine_FMODEX::shutdown() done closing FMOD" << llendl; + llinfos << "LLAudioEngine_FMODEX::shutdown() done closing FMOD Ex" << llendl; delete mListenerp; mListenerp = NULL; diff --git a/indra/llaudio/llvorbisencode.cpp b/indra/llaudio/llvorbisencode.cpp index 8682664b6..d06654ace 100644 --- a/indra/llaudio/llvorbisencode.cpp +++ b/indra/llaudio/llvorbisencode.cpp @@ -89,7 +89,7 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro // ******************************** LLAPRFile infile ; - infile.open(in_fname,LL_APR_RB); + infile.open(in_fname,LL_APR_RB); // ******************************** if (!infile.getFileHandle()) { diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 25991f04e..1b202fa4d 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1352,39 +1352,40 @@ if (OPENAL) endif (OPENAL) if (FMOD OR FMODEX) - if(FMODEX) - set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODEX") - endif(FMODEX) - if(FMOD) + if (FMODEX) + set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODEX") + endif (FMODEX) + if (FMOD) set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMOD") - endif(FMOD) + endif (FMOD) - if (NOT WINDOWS) + if (DARWIN) set(fmodwrapper_SOURCE_FILES fmodwrapper.cpp) add_library(fmodwrapper SHARED ${fmodwrapper_SOURCE_FILES}) - if(FMOD AND FMODEX) - set(fmodwrapper_needed_LIBRARIES "${FMODEX_LIBRARY} ${FMOD_LIBRARY}") - else(FMOD AND FMODEX) - if(FMODEX) - set(fmodwrapper_needed_LIBRARIES ${FMODEX_LIBRARY}) - endif(FMODEX) - if(FMOD) - set(fmodwrapper_needed_LIBRARIES "${FMOD_LIBRARY}") - endif(FMOD) - endif(FMOD AND FMODEX) - if (DARWIN) - list(APPEND fmodwrapper_needed_LIBRARIES ${CARBON_LIBRARY}) - set_target_properties( - fmodwrapper - PROPERTIES - BUILD_WITH_INSTALL_RPATH 1 - INSTALL_NAME_DIR "@executable_path/../Resources" - LINK_FLAGS "-unexported_symbols_list \"${CMAKE_CURRENT_SOURCE_DIR}/fmod_hidden_symbols.exp\"" - ) - endif (DARWIN) + if (FMODEX) + set(fmodwrapper_needed_LIBRARIES ${FMODEX_LIBRARY} ${CARBON_LIBRARY}) + endif (FMODEX) + if (FMOD) + set(fmodwrapper_needed_LIBRARIES ${FMOD_LIBRARY} ${CARBON_LIBRARY}) + endif (FMOD) + set_target_properties( + fmodwrapper + PROPERTIES + BUILD_WITH_INSTALL_RPATH 1 + INSTALL_NAME_DIR "@executable_path/../Resources" + LINK_FLAGS "-unexported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/fmod_hidden_symbols.exp" + ) set(FMODWRAPPER_LIBRARY fmodwrapper) target_link_libraries(fmodwrapper ${fmodwrapper_needed_LIBRARIES}) - endif (NOT WINDOWS) + else (DARWIN) + # fmodwrapper unnecessary on linux or windows, for fmod and fmodex + if (FMODEX) + set(FMODWRAPPER_LIBRARY ${FMODEX_LIBRARY}) + endif (FMODEX) + if (FMOD) + set(FMODWRAPPER_LIBRARY ${FMOD_LIBRARY}) + endif (FMOD) + endif (DARWIN) endif (FMOD OR FMODEX) set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") From 8dc0e16f0ab3c1cb8a4c072876bd21249e26debc Mon Sep 17 00:00:00 2001 From: Drake Arconis Date: Tue, 15 May 2012 06:30:54 -0400 Subject: [PATCH 10/15] Modified wrapper script with new options for FMOD Ex --- indra/newview/linux_tools/wrapper.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/indra/newview/linux_tools/wrapper.sh b/indra/newview/linux_tools/wrapper.sh index a20e94283..ea944f1c2 100755 --- a/indra/newview/linux_tools/wrapper.sh +++ b/indra/newview/linux_tools/wrapper.sh @@ -6,15 +6,20 @@ ## - Avoids using any OpenAL audio driver. #export LL_BAD_OPENAL_DRIVER=x +## - Avoids using any FMOD Ex audio driver. +#export LL_BAD_FMODEX_DRIVER=x ## - Avoids using any FMOD audio driver. #export LL_BAD_FMOD_DRIVER=x -## - Avoids using the FMOD ESD audio driver. -#export LL_BAD_FMOD_ESD=x -## - Avoids using the FMOD OSS audio driver. -#export LL_BAD_FMOD_OSS=x -## - Avoids using the FMOD ALSA audio driver. +## - Avoids using the FMOD Ex PulseAudio audio driver. +#export LL_BAD_FMOD_PULSEAUDIO=x +## - Avoids using the FMOD or FMOD Ex ALSA audio driver. #export LL_BAD_FMOD_ALSA=x +## - Avoids using the FMOD or FMOD Ex OSS audio driver. +#export LL_BAD_FMOD_OSS=x +## - Avoids using the FMOD or FMOD Ex ESD audio driver. +#export LL_BAD_FMOD_ESD=x + ## - Avoids the optional OpenGL extensions which have proven most problematic ## on some hardware. Disabling this option may cause BETTER PERFORMANCE but From fa4ee553085968c65932b743498e5a617a824231 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Wed, 28 Mar 2012 00:00:42 -0400 Subject: [PATCH 11/15] Nomade Zhao's 4 fixes for translation. Re: Issue 340 Conflicts: indra/newview/skins/default/xui/en-us/panel_preferences_ascent_chat.xml --- .../newview/skins/default/xui/en-us/floater_about_land.xml | 2 +- .../skins/default/xui/en-us/floater_display_name.xml | 4 ++-- .../default/xui/en-us/panel_preferences_ascent_chat.xml | 6 +++--- .../skins/default/xui/en-us/panel_preferences_network.xml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/indra/newview/skins/default/xui/en-us/floater_about_land.xml b/indra/newview/skins/default/xui/en-us/floater_about_land.xml index b091777c6..08a6c38f7 100644 --- a/indra/newview/skins/default/xui/en-us/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en-us/floater_about_land.xml @@ -911,7 +911,7 @@ Only large parcels can be listed in search. height="16" left="10" length="1" - name="at URL:" + name="at URL2:" type="string" width="65"> Current URL: diff --git a/indra/newview/skins/default/xui/en-us/floater_display_name.xml b/indra/newview/skins/default/xui/en-us/floater_display_name.xml index d31e9271e..9e49c9d93 100644 --- a/indra/newview/skins/default/xui/en-us/floater_display_name.xml +++ b/indra/newview/skins/default/xui/en-us/floater_display_name.xml @@ -19,10 +19,10 @@