diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 265502a02d..069eada980 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -76,6 +76,10 @@ if(WINDOWS) endif(ADDRESS_SIZE EQUAL 32) endif (FMODEX) + if (OPENAL) + set(release_files ${release_files} OpenAL32.dll alut.dll) + endif (OPENAL) + #******************************* # Copy MS C runtime dlls, required for packaging. # *TODO - Adapt this to support VC9 diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py index 201a2214ba..f8771b5936 100755 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -161,7 +161,7 @@ BASE_ARGUMENTS=[ dict(name='viewer_flavor', description='Type of viewer build. Can be oss or hvk.', default="oss"), dict(name='fmodversion', - description='Version of FMOD used. Can be fmodstudio or fmodex.', default=None), + description='Version of FMOD used. Can be fmodstudio or fmodex.', default=None) ] def usage(arguments, srctree=""): diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index 0df1be69b9..9da9e8f27c 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -78,6 +78,10 @@ if (FMODEX) endif (FMODEX) if (OPENAL) + include_directories( + ${OPENAL_LIBRARIES} + ) + list(APPEND llaudio_SOURCE_FILES llaudioengine_openal.cpp lllistener_openal.cpp diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index 2cb9f40a26..77935169bb 100644 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -832,7 +832,9 @@ F64 LLAudioEngine::mapWindVecToPan(LLVector3 wind_vec) void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_id, const F32 gain, - const S32 type, const LLVector3d &pos_global, const LLUUID& source_object) + // / Optional parameter for setting the audio source UUID + // const S32 type, const LLVector3d &pos_global, const LLUUID& source_object) + const S32 type, const LLVector3d &pos_global, const LLUUID& source_object, const LLUUID& audio_source_id) { // Create a new source (since this can't be associated with an existing source. //LL_INFOS() << "Localized: " << audio_uuid << LL_ENDL; @@ -843,8 +845,14 @@ void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_i return; } - LLUUID source_id; - source_id.generate(); + // Only generate the id if one wasn't passed to the method + //LLUUID source_id; + //source_id.generate(); + LLUUID source_id = audio_source_id; + if (source_id.isNull()) + { + source_id.generate(); + } LLAudioSource *asp = new LLAudioSource(source_id, owner_id, gain, type, source_object, true); addAudioSource(asp); diff --git a/indra/llaudio/llaudioengine.h b/indra/llaudio/llaudioengine.h index 3e2bf542fb..f685f3fc84 100644 --- a/indra/llaudio/llaudioengine.h +++ b/indra/llaudio/llaudioengine.h @@ -150,7 +150,11 @@ public: void triggerSound(const LLUUID &sound_id, const LLUUID& owner_id, const F32 gain, const S32 type = LLAudioEngine::AUDIO_TYPE_NONE, const LLVector3d &pos_global = LLVector3d::zero, - const LLUUID& source_object = LLUUID::null); + // Optional parameter for setting the audio source UUID + // const LLUUID& source_object = LLUUID::null); + const LLUUID& source_object = LLUUID::null, + const LLUUID& audio_source_id = LLUUID::null); + // NaCl End void triggerSound(SoundData& soundData); diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index d7d4249d93..4fa0ba0117 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1338,7 +1338,47 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) handled = TRUE; } break; + + // FIRE-19933: Open context menu on context menu key press + case KEY_CONTEXT_MENU: + S32 count = mSelectedItems.size(); + LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get(); + if (( count > 0 && (hasVisibleChildren()) ) // show menu only if selected items are visible + && menu ) + { + if (mCallbackRegistrar) + { + mCallbackRegistrar->pushScope(); + } + + updateMenuOptions(menu); + menu->updateParent(LLMenuGL::sMenuContainer); + + LLView* spawning_view = getParentByType(); + if (!spawning_view) + { + spawning_view = this; + } + + LLMenuGL::showPopup(spawning_view, menu, spawning_view->getRect().getCenterX(), spawning_view->getRect().getCenterY()); + + if (mCallbackRegistrar) + { + mCallbackRegistrar->popScope(); + } + } + else + { + if (menu && menu->getVisible()) + { + menu->setVisible(FALSE); + } + setSelection(NULL, FALSE, TRUE); + } + handled = TRUE; + break; } + // return handled; } diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 258b99db28..735da21d05 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1974,6 +1974,10 @@ if (WINDOWS) LIST(APPEND viewer_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/../tools/manifests/legacy.manifest) endif (ADDRESS_SIZE EQUAL 64) # + + if (OPENAL) + LIST(APPEND viewer_LIBRARIES ${OPENAL_LIBRARIES}) + endif (OPENAL) endif (WINDOWS) # Add the xui files. This is handy for searching for xui elements @@ -2269,6 +2273,13 @@ if (WINDOWS) ) endif (FMODEX) + if (OPENAL) + list(APPEND COPY_INPUT_DEPENDENCIES + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/OpenAL32.dll + ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/alut.dll + ) + endif (OPENAL) + add_custom_command( OUTPUT ${CMAKE_CFG_INTDIR}/copy_touched.bat COMMAND ${PYTHON_EXECUTABLE} @@ -2289,6 +2300,7 @@ if (WINDOWS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py stage_third_party_libs @@ -2352,6 +2364,7 @@ if (WINDOWS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2440,6 +2453,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${DBUSGLIB_LIBRARIES} ${OPENGL_LIBRARIES} ${FMODWRAPPER_LIBRARY} # must come after LLAudio + ${OPENAL_LIBRARIES} ${GLOD_LIBRARIES} ${OPENGL_LIBRARIES} ${JSONCPP_LIBRARIES} @@ -2523,6 +2537,7 @@ endif (NOT ENABLE_MEDIA_PLUGINS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${COPY_INPUT_DEPENDENCIES} @@ -2548,6 +2563,7 @@ endif (NOT ENABLE_MEDIA_PLUGINS) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${COPY_INPUT_DEPENDENCIES} @@ -2632,6 +2648,7 @@ if (DARWIN) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2668,6 +2685,7 @@ if (DARWIN) --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --viewer_flavor=${ND_VIEWER_FLAVOR} --fmodversion=${FMODVERSION} + --openal=${OPENAL} ${SIGNING_SETTING} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py diff --git a/indra/newview/NACLfloaterexploresounds.cpp b/indra/newview/NACLfloaterexploresounds.cpp index c9e27c5fd4..c4473f0fbf 100644 --- a/indra/newview/NACLfloaterexploresounds.cpp +++ b/indra/newview/NACLfloaterexploresounds.cpp @@ -63,6 +63,8 @@ NACLFloaterExploreSounds::~NACLFloaterExploreSounds() } } mBlacklistAvatarNameCacheConnections.clear(); + + mLocalPlayingAudioSourceIDs.clear(); } BOOL NACLFloaterExploreSounds::postBuild() @@ -71,6 +73,7 @@ BOOL NACLFloaterExploreSounds::postBuild() getChild("look_at_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::handleLookAt, this)); getChild("stop_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::handleStop, this)); getChild("bl_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::blacklistSound, this)); + getChild("stop_locally_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::handleStopLocally, this)); mHistoryScroller = getChild("sound_list"); mHistoryScroller->setCommitCallback(boost::bind(&NACLFloaterExploreSounds::handleSelection, this)); @@ -296,6 +299,32 @@ BOOL NACLFloaterExploreSounds::tick() mHistoryScroller->selectMultiple(selected_ids); mHistoryScroller->setScrollPos(scroll_pos); + // Clean up stopped local audio source IDs + uuid_vec_t stopped_audio_src_ids; + uuid_vec_t::iterator audio_src_id_iter = mLocalPlayingAudioSourceIDs.begin(); + uuid_vec_t::iterator audio_src_id_end = mLocalPlayingAudioSourceIDs.end(); + for (; audio_src_id_iter != audio_src_id_end; ++audio_src_id_iter) + { + LLUUID audio_src_id = *audio_src_id_iter; + LLAudioSource* audio_source = gAudiop->findAudioSource(audio_src_id); + if (!audio_source || audio_source->isDone()) + { + stopped_audio_src_ids.push_back(audio_src_id); + } + } + + for (uuid_vec_t::iterator stopped_audio_src_ids_iter = stopped_audio_src_ids.begin(); + stopped_audio_src_ids_iter != stopped_audio_src_ids.end(); ++stopped_audio_src_ids_iter) + { + uuid_vec_t::iterator find_iter = std::find(mLocalPlayingAudioSourceIDs.begin(), mLocalPlayingAudioSourceIDs.end(), *stopped_audio_src_ids_iter); + if (find_iter != mLocalPlayingAudioSourceIDs.end()) + { + mLocalPlayingAudioSourceIDs.erase(find_iter); + } + } + + childSetEnabled("stop_locally_btn", mLocalPlayingAudioSourceIDs.size() > 0); + return FALSE; } @@ -313,9 +342,13 @@ void NACLFloaterExploreSounds::handlePlayLocally() if(std::find(asset_list.begin(), asset_list.end(), item.mAssetID) == asset_list.end()) { asset_list.push_back(item.mAssetID); - gAudiop->triggerSound(item.mAssetID, gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI); + LLUUID audio_source_id = LLUUID::generateNewID(); + gAudiop->triggerSound(item.mAssetID, gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI, LLVector3d::zero, LLUUID::null, audio_source_id); + mLocalPlayingAudioSourceIDs.push_back(audio_source_id); } } + + childSetEnabled("stop_locally_btn", mLocalPlayingAudioSourceIDs.size() > 0); } void NACLFloaterExploreSounds::handleLookAt() @@ -384,6 +417,23 @@ void NACLFloaterExploreSounds::handleStop() } } +void NACLFloaterExploreSounds::handleStopLocally() +{ + uuid_vec_t::iterator audio_source_id_iter = mLocalPlayingAudioSourceIDs.begin(); + uuid_vec_t::iterator audio_source_id_end = mLocalPlayingAudioSourceIDs.end(); + for (; audio_source_id_iter != audio_source_id_end; ++audio_source_id_iter) + { + LLUUID audio_source_id = *audio_source_id_iter; + LLAudioSource* audio_source = gAudiop->findAudioSource(audio_source_id); + if (audio_source && !audio_source->isDone()) + { + audio_source->play(LLUUID::null); + } + } + + mLocalPlayingAudioSourceIDs.clear(); +} + //add sound to blacklist void NACLFloaterExploreSounds::blacklistSound() { diff --git a/indra/newview/NACLfloaterexploresounds.h b/indra/newview/NACLfloaterexploresounds.h index 33c1da97ce..0f2df60c99 100644 --- a/indra/newview/NACLfloaterexploresounds.h +++ b/indra/newview/NACLfloaterexploresounds.h @@ -29,6 +29,7 @@ private: void handlePlayLocally(); void handleLookAt(); void handleStop(); + void handleStopLocally(); void handleSelection(); void blacklistSound(); @@ -41,6 +42,8 @@ private: std::list mLastHistory; + uuid_vec_t mLocalPlayingAudioSourceIDs; + typedef std::map blacklist_avatar_name_cache_connection_map_t; blacklist_avatar_name_cache_connection_map_t mBlacklistAvatarNameCacheConnections; diff --git a/indra/newview/fsareasearch.cpp b/indra/newview/fsareasearch.cpp index 3f2a41db23..1a7e65633f 100644 --- a/indra/newview/fsareasearch.cpp +++ b/indra/newview/fsareasearch.cpp @@ -1323,6 +1323,11 @@ void FSAreaSearch::onCommitCheckboxRegex() } } +void FSAreaSearch::setFindOwnerText(std::string value) +{ + mPanelFind->mOwnerLineEditor->setText(value); +} + //--------------------------------------------------------------------------- // List panel @@ -1632,6 +1637,25 @@ bool FSPanelAreaSearchList::onContextMenuItemClick(const LLSD& userdata) std::string action = userdata.asString(); LL_DEBUGS("FSAreaSearch") << "Right click menu " << action << " was selected." << LL_ENDL; + if (action == "select_all") + { + std::vector result_items = mResultList->getAllData(); + std::for_each(result_items.begin(), result_items.end(), [](LLScrollListItem* item) { item->setSelected(TRUE); }); + return true; + } + if (action == "clear_selection") + { + std::vector selected_items = mResultList->getAllSelected(); + std::for_each(selected_items.begin(), selected_items.end(), [](LLScrollListItem* item) { item->setSelected(FALSE); }); + return true; + } + if (action == "filter_my_objects") + { + mFSAreaSearch->setFindOwnerText(gAgentUsername); + mFSAreaSearch->onButtonClickedSearch(); + return true; + } + // NOTE that each action command MUST begin with a different letter. char c = action.at(0); switch(c) diff --git a/indra/newview/fsareasearch.h b/indra/newview/fsareasearch.h index 5b8f3a8d74..9ad465aac4 100644 --- a/indra/newview/fsareasearch.h +++ b/indra/newview/fsareasearch.h @@ -126,6 +126,7 @@ public: void onButtonClickedSearch(); void onCommitCheckboxRegex(); bool isSearchableObject (LLViewerObject* objectp, LLViewerRegion* our_region); + void setFindOwnerText(std::string value); std::map mObjectDetails; diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index 7d13644ef0..4d641ae17b 100644 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -1274,8 +1274,9 @@ void LLSecAPIBasicHandler::init() "bin_conf.dat"); mLegacyPasswordPath = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "password.dat"); - mProtectedDataFilename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, - "bin_conf.dat"); + // Duplicate line + //mProtectedDataFilename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, + // "bin_conf.dat"); std::string store_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "CA.pem"); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 603beffd4b..1b43e8a11a 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -82,14 +82,11 @@ #include "llcorehttputil.h" #include "llcallstack.h" -// Opensim -#include "llviewerparcelmgr.h" //Aurora Sim -#ifdef OPENSIM -#include "llviewernetwork.h" -#endif -// -#include "llviewermenu.h" +// Firestorm includes #include "lfsimfeaturehandler.h" +#include "llviewermenu.h" +#include "llviewernetwork.h" +#include "llviewerparcelmgr.h" //Aurora Sim #ifdef LL_WINDOWS #pragma warning(disable:4355) diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 70a0115f73..b876ae6fd4 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -82,9 +82,7 @@ // [Legacy Bake] -#ifdef OPENSIM #include "llviewernetwork.h" -#endif // [Legacy Bake] #if LL_MSVC diff --git a/indra/newview/skins/default/xui/en/floater_NACL_explore_sounds.xml b/indra/newview/skins/default/xui/en/floater_NACL_explore_sounds.xml index 7fe8c383ab..c194052347 100644 --- a/indra/newview/skins/default/xui/en/floater_NACL_explore_sounds.xml +++ b/indra/newview/skins/default/xui/en/floater_NACL_explore_sounds.xml @@ -47,6 +47,7 @@