diff options
author | dolphin <dolphin@lindenlab.com> | 2013-04-18 15:59:22 -0700 |
---|---|---|
committer | dolphin <dolphin@lindenlab.com> | 2013-04-18 15:59:22 -0700 |
commit | eec08ef64c59fa7569c7418d40135d73338e1d8d (patch) | |
tree | 3b62188c704df9ea16484c497d68388ab2908b80 /indra/newview | |
parent | 56badfe3498b5eeefb5c06c4b0d51eb1c62ded9c (diff) | |
parent | ed2b5da8f1eb51e747f6d9f5a4fc535cbf7e69d9 (diff) |
Merge with viewer-development
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/CMakeLists.txt | 45 | ||||
-rwxr-xr-x | indra/newview/app_settings/settings.xml | 56 | ||||
-rw-r--r-- | indra/newview/fmod_hidden_symbols.exp | 240 | ||||
-rw-r--r-- | indra/newview/fmodwrapper.cpp | 37 | ||||
-rwxr-xr-x | indra/newview/linux_tools/wrapper.sh | 14 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llfloateravatarpicker.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llvieweraudio.cpp | 70 | ||||
-rw-r--r-- | indra/newview/llviewercontrol.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llviewerobject.cpp | 36 | ||||
-rw-r--r-- | indra/newview/llviewerobject.h | 2 | ||||
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 29 | ||||
-rw-r--r-- | indra/newview/viewer_manifest.py | 25 |
14 files changed, 187 insertions, 411 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 2fd025cda4..f6c8e12140 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -10,7 +10,7 @@ include(DirectX) include(OpenSSL) include(DragDrop) include(EXPAT) -include(FMOD) +include(FMODEX) include(OPENAL) include(OpenGL) include(Hunspell) @@ -53,6 +53,10 @@ if (NOT HAVOK_TPV) add_subdirectory(${LLPHYSICSEXTENSIONS_SRC_DIR} llphysicsextensions) endif (NOT HAVOK_TPV) +if(FMODEX) + include_directories(${FMODEX_INCLUDE_DIR}) +endif(FMODEX) + include_directories( ${DBUSGLIB_INCLUDE_DIRS} ${JSONCPP_INCLUDE_DIR} @@ -62,7 +66,6 @@ include_directories( ${LLCOMMON_INCLUDE_DIRS} ${LLCOREHTTP_INCLUDE_DIRS} ${LLPHYSICS_INCLUDE_DIRS} - ${FMOD_INCLUDE_DIR} ${LLIMAGE_INCLUDE_DIRS} ${LLKDU_INCLUDE_DIRS} ${LLINVENTORY_INCLUDE_DIRS} @@ -1537,29 +1540,12 @@ endif (WINDOWS) if (OPENAL) set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_OPENAL") -endif (OPENAL) - -if (FMOD) - set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMOD") +endif (OPENAL) - if (DARWIN) - set(fmodwrapper_SOURCE_FILES fmodwrapper.cpp) - add_library(fmodwrapper SHARED ${fmodwrapper_SOURCE_FILES}) - set(fmodwrapper_needed_LIBRARIES ${FMOD_LIBRARY} ${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" - ) - set(FMODWRAPPER_LIBRARY fmodwrapper) - target_link_libraries(fmodwrapper ${fmodwrapper_needed_LIBRARIES}) - else (DARWIN) - # fmodwrapper unnecessary on linux or windows - set(FMODWRAPPER_LIBRARY ${FMOD_LIBRARY}) - endif (DARWIN) -endif (FMOD) +if (FMODEX) + set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODEX") + set(FMODWRAPPER_LIBRARY ${FMODEX_LIBRARY}) +endif (FMODEX) set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") @@ -1640,9 +1626,6 @@ if (WINDOWS) ${SHARED_LIB_STAGING_DIR}/Release/openjpeg.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/openjpeg.dll ${SHARED_LIB_STAGING_DIR}/Debug/openjpegd.dll - ${SHARED_LIB_STAGING_DIR}/Release/fmod.dll - ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod.dll - ${SHARED_LIB_STAGING_DIR}/Debug/fmod.dll ${SHARED_LIB_STAGING_DIR}/Release/msvcr100.dll ${SHARED_LIB_STAGING_DIR}/Release/msvcp100.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/msvcr100.dll @@ -1707,6 +1690,14 @@ if (WINDOWS) windows-updater ) + if (FMODEX) + list(APPEND COPY_INPUT_DEPENDENCIES + ${SHARED_LIB_STAGING_DIR}/Release/fmodex.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmodex.dll + ${SHARED_LIB_STAGING_DIR}/Debug/fmodexL.dll + ) + endif (FMODEX) + add_custom_command( OUTPUT ${CMAKE_CFG_INTDIR}/copy_touched.bat COMMAND ${PYTHON_EXECUTABLE} diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f66d8fca5b..3281d347a7 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -291,6 +291,17 @@ <key>Value</key> <real>1.0</real> </map> + <key>AudioLevelUnderwaterRolloff</key> + <map> + <key>Comment</key> + <string>Controls the distance-based dropoff of audio volume underwater(fraction or multiple of default audio rolloff)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>5.0</real> + </map> <key>AudioLevelSFX</key> <map> <key>Comment</key> @@ -14446,7 +14457,50 @@ <key>Value</key> <integer>0</integer> </map> - + <key>DisablePrecacheDelayAfterTeleporting</key> + <map> + <key>Comment</key> + <string>Disables the artificial delay in the viewer that precaches some incoming assets</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>FMODExProfilerEnable</key> + <map> + <key>Comment</key> + <string>Enable profiler tool if using FMOD Ex</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>FMODExDecodeBufferSize</key> + <map> + <key>Comment</key> + <string>Sets the streaming decode buffer size (in milliseconds)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>U32</string> + <key>Value</key> + <integer>1000</integer> + </map> + <key>FMODExStreamBufferSize</key> + <map> + <key>Comment</key> + <string>Sets the streaming buffer size (in milliseconds)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>U32</string> + <key>Value</key> + <integer>7000</integer> + </map> <key>DisablePrecacheDelayAfterTeleporting</key> <map> <key>Comment</key> diff --git a/indra/newview/fmod_hidden_symbols.exp b/indra/newview/fmod_hidden_symbols.exp deleted file mode 100644 index 1e790255bc..0000000000 --- a/indra/newview/fmod_hidden_symbols.exp +++ /dev/null @@ -1,240 +0,0 @@ -_CarbonSndPlayDoubleBuffer -_ConvertFromIeeeExtended -__book_maptype1_quantvals -__book_unquantize -__float32_pack -__float32_unpack -__ilog -__make_words -_lpc_clear -_lpc_init -__vorbis_block_alloc -__vorbis_block_ripcord -__vorbis_apply_window -__vorbis_window_get -_vorbis_analysis_blockout -_vorbis_analysis_buffer -_vorbis_analysis_wrote -_vorbis_block_clear -_vorbis_block_init -_vorbis_dsp_clear -_vorbis_synthesis_blockin -_vorbis_synthesis_init -_vorbis_synthesis_pcmout -_vorbis_synthesis_read -_vorbis_packet_blocksize -_vorbis_synthesis -_vorbis_book_clear -_vorbis_book_decode -_vorbis_book_decodev_add -_vorbis_book_decodev_set -_vorbis_book_decodevs_add -_vorbis_book_decodevv_add -_vorbis_book_init_decode -_vorbis_comment_add -_vorbis_comment_add_tag -_vorbis_comment_clear -_vorbis_comment_init -_vorbis_comment_query -_vorbis_comment_query_count -_vorbis_coslook -_vorbis_fromdBlook -_vorbis_info_blocksize -_vorbis_info_clear -_vorbis_info_init -_vorbis_invsq2explook -_vorbis_invsqlook -_vorbis_lpc_from_curve -_vorbis_lpc_from_data -_vorbis_lpc_predict -_vorbis_lsp_to_curve -_vorbis_staticbook_clear -_vorbis_staticbook_destroy -_vorbis_staticbook_unpack -_vorbis_synthesis_headerin -_vorbis_synthesis_lapout -_vorbis_synthesis_restart -_vorbis_synthesis_trackonly -_vorbis_window -_ogg_packet_clear -_ogg_page_bos -_ogg_page_checksum_set -_ogg_page_continued -_ogg_page_eos -_ogg_page_granulepos -_ogg_page_packets -_ogg_page_pageno -_ogg_page_serialno -_ogg_page_version -_ogg_stream_reset_serialno -_ogg_stream_clear -_ogg_stream_destroy -_ogg_stream_eos -_ogg_stream_flush -_ogg_stream_init -_ogg_stream_packetout -_ogg_stream_packetpeek -_ogg_stream_pagein -_ogg_stream_pageout -_ogg_stream_reset -_ogg_sync_buffer -_ogg_sync_clear -_ogg_sync_destroy -_ogg_sync_init -_ogg_sync_pageout -_ogg_sync_pageseek -_ogg_sync_reset -_ogg_sync_wrote -_ov_bitrate -_ov_bitrate_instant -_ov_clear -_ov_comment -_ov_info -_ov_open -_ov_open_callbacks -_ov_pcm_seek -_ov_pcm_seek_page -_ov_pcm_tell -_ov_pcm_total -_ov_raw_seek -_ov_raw_tell -_ov_raw_total -_ov_read -_ov_read_float -_ov_seekable -_ov_serialnumber -_ov_streams -_ov_test -_ov_test_callbacks -_ov_test_open -_ov_time_seek -_ov_time_seek_page -_ov_time_tell -_ov_time_total -_ogg_toupper -_oggpackB_adv -_oggpackB_adv1 -_oggpackB_bits -_oggpackB_bytes -_oggpackB_get_buffer -_oggpackB_look -_oggpackB_look1 -_oggpackB_read -_oggpackB_read1 -_oggpackB_readinit -_oggpackB_reset -_oggpack_adv -_oggpack_adv1 -_oggpack_bits -_oggpack_bytes -_oggpack_get_buffer -_oggpack_look -_oggpack_look1 -_oggpack_read -_oggpack_read1 -_oggpack_readinit -_oggpack_reset -_ov_crosslap -_ov_pcm_seek_lap -_ov_pcm_seek_page_lap -_ov_raw_seek_lap -_ov_time_seek_lap -_ov_time_seek_page_lap -_II_step_one -_II_step_two -_MyRecComp -_SampleRates -_Sinfo -_ValidStepIndex -__Z11fmodwrapperv -__Z11fmodwrapperv.eh -__floor_P -__mapping_P -__residue_P -__ve_envelope_clear -__ve_envelope_init -__ve_envelope_mark -__ve_envelope_search -__ve_envelope_shift -__vi_gpsy_free -__vi_psy_free -__vorbis_window_init -__vp_ampmax_decay -__vp_couple -__vp_global_free -__vp_global_look -__vp_noise_normalize -__vp_noise_normalize_sort -__vp_noisemask -__vp_offset_and_mix -__vp_psy_clear -__vp_psy_init -__vp_quantize_couple_memo -__vp_quantize_couple_sort -__vp_remove_floor -__vp_tonemask -_alloc_0 -_alloc_1 -_alloc_2 -_alloc_3 -_alloc_4 -_bandInfo -_cdcallback -_cdchannel -_cdmode -_cdnumtracks -_cdstream -_cdtrack -_drft_backward -_drft_clear -_drft_forward -_drft_init -_eatwhite -_floor0_exportbundle -_floor1_exportbundle -_gFreeList -_gNMRecBusy -_gNMRecPtr -_gSilenceOnes -_gSilenceTwos -_longLimit -_mapping0_exportbundle -_mdct_backward -_mdct_clear -_mdct_forward -_mdct_init -_muls -_mystrdup -_res0_free_info -_res0_free_look -_res0_inverse -_res0_look -_res0_unpack -_res1_class -_res1_inverse -_res2_inverse -_residue0_exportbundle -_residue1_exportbundle -_residue2_exportbundle -_scale -_shortLimit -_tabsel_123 -_F_Free -_F_Malloc -_F_ReAlloc -_F_memcmp -_F_memmove -_F_strcat -_F_strchr -_F_strcmp -_F_strcpy -_F_stricmp -_F_strlen -_F_strncat -_F_strncmp -_F_strncpy -_F_strnicmp -_F_strstr -_F_strupr -_F_tolower -_F_toupper diff --git a/indra/newview/fmodwrapper.cpp b/indra/newview/fmodwrapper.cpp deleted file mode 100644 index 16f1d19a78..0000000000 --- a/indra/newview/fmodwrapper.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file fmodwrapper.cpp - * @brief dummy source file for building a shared library to wrap libfmod.a - * - * $LicenseInfo:firstyear=2005&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -extern "C" -{ - void FSOUND_Init(void); -} - -void* fmodwrapper(void) -{ - // When building the fmodwrapper library, the linker doesn't seem to want to bring in libfmod.a unless I explicitly - // reference at least one symbol in the library. This seemed like the simplest way. - return (void*)&FSOUND_Init; -} diff --git a/indra/newview/linux_tools/wrapper.sh b/indra/newview/linux_tools/wrapper.sh index 1381e49c62..48b883e999 100755 --- a/indra/newview/linux_tools/wrapper.sh +++ b/indra/newview/linux_tools/wrapper.sh @@ -4,17 +4,17 @@ ## These options are for self-assisted troubleshooting during this beta ## testing phase; you should not usually need to touch them. +## - Avoids using any FMOD Ex audio driver. +#export LL_BAD_FMODEX_DRIVER=x ## - Avoids using any OpenAL audio driver. #export LL_BAD_OPENAL_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 the optional OpenGL extensions which have proven most problematic ## on some hardware. Disabling this option may cause BETTER PERFORMANCE but diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 03d9b683a4..49c553d0cc 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1708,19 +1708,7 @@ bool LLAppViewer::cleanup() gAudiop->setStreamingAudioImpl(NULL); // shut down the audio subsystem - - bool want_longname = false; - if (gAudiop->getDriverName(want_longname) == "FMOD") - { - // This hack exists because fmod likes to occasionally - // crash or hang forever when shutting down, for no - // apparent reason. - llwarns << "Hack, skipping FMOD audio engine cleanup" << llendflush; - } - else - { - gAudiop->shutdown(); - } + gAudiop->shutdown(); delete gAudiop; gAudiop = NULL; diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 3e0e82b579..113aa9a8f2 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -818,7 +818,14 @@ bool LLFloaterAvatarPicker::isSelectBtnEnabled() uuid_vec_t avatar_ids; std::vector<LLAvatarName> avatar_names; getSelectedAvatarData(list, avatar_ids, avatar_names); - return mOkButtonValidateSignal(avatar_ids); + if (avatar_ids.size() >= 1) + { + ret_val = mOkButtonValidateSignal(avatar_ids); + } + else + { + ret_val = false; + } } } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 5e6175c4ed..a14a435156 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -37,8 +37,8 @@ #include "llviewermedia_streamingaudio.h" #include "llaudioengine.h" -#ifdef LL_FMOD -# include "llaudioengine_fmod.h" +#ifdef LL_FMODEX +# include "llaudioengine_fmodex.h" #endif #ifdef LL_OPENAL @@ -624,32 +624,32 @@ bool idle_startup() { gAudiop = NULL; -#ifdef LL_OPENAL +#ifdef LL_FMODEX if (!gAudiop #if !LL_WINDOWS - && NULL == getenv("LL_BAD_OPENAL_DRIVER") + && NULL == getenv("LL_BAD_FMODEX_DRIVER") #endif // !LL_WINDOWS ) { - gAudiop = (LLAudioEngine *) new LLAudioEngine_OpenAL(); + gAudiop = (LLAudioEngine *) new LLAudioEngine_FMODEX(gSavedSettings.getBOOL("FMODExProfilerEnable")); } #endif -#ifdef LL_FMOD +#ifdef LL_OPENAL if (!gAudiop #if !LL_WINDOWS - && NULL == getenv("LL_BAD_FMOD_DRIVER") + && NULL == getenv("LL_BAD_OPENAL_DRIVER") #endif // !LL_WINDOWS ) { - gAudiop = (LLAudioEngine *) new LLAudioEngine_FMOD(); + gAudiop = (LLAudioEngine *) new LLAudioEngine_OpenAL(); } #endif - + if (gAudiop) { #if LL_WINDOWS - // FMOD on Windows needs the window handle to stop playing audio + // FMOD Ex on Windows needs the window handle to stop playing audio // when window is minimized. JC void* window_handle = (HWND)gViewerWindow->getPlatformWindow(); #else diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index 564bf7997a..094694dc06 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -44,6 +44,8 @@ #include "llparcel.h" #include "llviewermessage.h" +#include "llstreamingaudio.h" + ///////////////////////////////////////////////////////// LLViewerAudio::LLViewerAudio() : @@ -102,6 +104,11 @@ void LLViewerAudio::startInternetStreamWithAutoFade(std::string streamURI) else { mFadeState = FADE_IN; + + LLStreamingAudioInterface *stream = gAudiop->getStreamingAudioImpl(); + if(stream && stream->supportsAdjustableBufferSizes()) + stream->setBufferSizes(gSavedSettings.getU32("FMODExStreamBufferSize"),gSavedSettings.getU32("FMODExDecodeBufferSize")); + gAudiop->startInternetStream(mNextStreamURI); startFading(); registerIdleListener(); @@ -157,6 +164,11 @@ bool LLViewerAudio::onIdleUpdate() if (!mNextStreamURI.empty()) { mFadeState = FADE_IN; + + LLStreamingAudioInterface *stream = gAudiop->getStreamingAudioImpl(); + if(stream && stream->supportsAdjustableBufferSizes()) + stream->setBufferSizes(gSavedSettings.getU32("FMODExStreamBufferSize"),gSavedSettings.getU32("FMODExDecodeBufferSize")); + gAudiop->startInternetStream(mNextStreamURI); startFading(); } @@ -386,7 +398,12 @@ void audio_update_volume(bool force_update) gAudiop->setMasterGain ( master_volume ); gAudiop->setDopplerFactor(gSavedSettings.getF32("AudioLevelDoppler")); - gAudiop->setRolloffFactor(gSavedSettings.getF32("AudioLevelRolloff")); + + if(!LLViewerCamera::getInstance()->cameraUnderWater()) + gAudiop->setRolloffFactor(gSavedSettings.getF32("AudioLevelRolloff")); + else + gAudiop->setRolloffFactor(gSavedSettings.getF32("AudioLevelUnderwaterRolloff")); + gAudiop->setMuted(mute_audio || progress_view_visible); //Play any deferred sounds when unmuted @@ -473,44 +490,22 @@ void audio_update_listener() void audio_update_wind(bool force_update) { #ifdef kAUDIO_ENABLE_WIND - // - // Extract height above water to modulate filter by whether above/below water - // + LLViewerRegion* region = gAgent.getRegion(); if (region) { - static F32 last_camera_water_height = -1000.f; - LLVector3 camera_pos = gAgentCamera.getCameraPositionAgent(); - F32 camera_water_height = camera_pos.mV[VZ] - region->getWaterHeight(); - - // - // Don't update rolloff factor unless water surface has been crossed - // - if (force_update || (last_camera_water_height * camera_water_height) < 0.f) - { - static LLUICachedControl<F32> rolloff("AudioLevelRolloff", 1.0f); - if (camera_water_height < 0.f) - { - gAudiop->setRolloffFactor(rolloff * LL_ROLLOFF_MULTIPLIER_UNDER_WATER); - } - else - { - gAudiop->setRolloffFactor(rolloff); - } - } - - // Scale down the contribution of weather-simulation wind to the - // ambient wind noise. Wind velocity averages 3.5 m/s, with gusts to 7 m/s - // whereas steady-state avatar walk velocity is only 3.2 m/s. - // Without this the world feels desolate on first login when you are - // standing still. - static LLUICachedControl<F32> wind_level("AudioLevelWind", 0.5f); - LLVector3 scaled_wind_vec = gWindVec * wind_level; - - // Mix in the avatar's motion, subtract because when you walk north, - // the apparent wind moves south. - LLVector3 final_wind_vec = scaled_wind_vec - gAgent.getVelocity(); - + // Scale down the contribution of weather-simulation wind to the + // ambient wind noise. Wind velocity averages 3.5 m/s, with gusts to 7 m/s + // whereas steady-state avatar walk velocity is only 3.2 m/s. + // Without this the world feels desolate on first login when you are + // standing still. + static LLUICachedControl<F32> wind_level("AudioLevelWind", 0.5f); + LLVector3 scaled_wind_vec = gWindVec * wind_level; + + // Mix in the avatar's motion, subtract because when you walk north, + // the apparent wind moves south. + LLVector3 final_wind_vec = scaled_wind_vec - gAgent.getVelocity(); + // rotate the wind vector to be listener (agent) relative gRelativeWindVec = gAgent.getFrameAgent().rotateToLocal( final_wind_vec ); @@ -543,8 +538,7 @@ void audio_update_wind(bool force_update) gAudiop->mMaxWindGain = llmax(gAudiop->mMaxWindGain - volume_delta, 0.f); } - last_camera_water_height = camera_water_height; - gAudiop->updateWind(gRelativeWindVec, camera_water_height); + gAudiop->updateWind(gRelativeWindVec, gAgentCamera.getCameraPositionAgent()[VZ] - gAgent.getRegion()->getWaterHeight()); } #endif } diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 051f5f4485..a62f73deef 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -655,6 +655,7 @@ void settings_setup_listeners() gSavedSettings.getControl("AudioLevelVoice")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2)); gSavedSettings.getControl("AudioLevelDoppler")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2)); gSavedSettings.getControl("AudioLevelRolloff")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2)); + gSavedSettings.getControl("AudioLevelUnderwaterRolloff")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2)); gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2)); gSavedSettings.getControl("MuteMusic")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2)); gSavedSettings.getControl("MuteMedia")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2)); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index fcf5af76ff..670272e7be 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2697,24 +2697,33 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS if(ft && (0 == error_code) && (object = gObjectList.findObject(ft->mTaskID))) { - object->loadTaskInvFile(ft->mFilename); + if (object->loadTaskInvFile(ft->mFilename)) + { - LLInventoryObject::object_list_t::iterator it = object->mInventory->begin(); - LLInventoryObject::object_list_t::iterator end = object->mInventory->end(); - std::list<LLUUID>& pending_lst = object->mPendingInventoryItemsIDs; + LLInventoryObject::object_list_t::iterator it = object->mInventory->begin(); + LLInventoryObject::object_list_t::iterator end = object->mInventory->end(); + std::list<LLUUID>& pending_lst = object->mPendingInventoryItemsIDs; - for (; it != end && pending_lst.size(); ++it) - { - LLViewerInventoryItem* item = dynamic_cast<LLViewerInventoryItem*>(it->get()); - if(item && item->getType() != LLAssetType::AT_CATEGORY) + for (; it != end && pending_lst.size(); ++it) { - std::list<LLUUID>::iterator id_it = std::find(pending_lst.begin(), pending_lst.begin(), item->getAssetUUID()); - if (id_it != pending_lst.end()) + LLViewerInventoryItem* item = dynamic_cast<LLViewerInventoryItem*>(it->get()); + if(item && item->getType() != LLAssetType::AT_CATEGORY) { - pending_lst.erase(id_it); + std::list<LLUUID>::iterator id_it = std::find(pending_lst.begin(), pending_lst.begin(), item->getAssetUUID()); + if (id_it != pending_lst.end()) + { + pending_lst.erase(id_it); + } } } } + else + { + // MAINT-2597 - crash when trying to edit a no-mod object + // Somehow get an contents inventory response, but with an invalid stream (possibly 0 size?) + // Stated repro was specific to no-mod objects so failing without user interaction should be safe. + llwarns << "Trying to load invalid task inventory file. Ignoring file contents." << llendl; + } } else { @@ -2726,7 +2735,7 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS delete ft; } -void LLViewerObject::loadTaskInvFile(const std::string& filename) +BOOL LLViewerObject::loadTaskInvFile(const std::string& filename) { std::string filename_and_local_path = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, filename); llifstream ifs(filename_and_local_path); @@ -2773,8 +2782,11 @@ void LLViewerObject::loadTaskInvFile(const std::string& filename) { llwarns << "unable to load task inventory: " << filename_and_local_path << llendl; + return FALSE; } doInventoryCallback(); + + return TRUE; } void LLViewerObject::doInventoryCallback() diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 728d279c39..316dbce7d0 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -656,7 +656,7 @@ protected: // static void processTaskInvFile(void** user_data, S32 error_code, LLExtStat ext_status); - void loadTaskInvFile(const std::string& filename); + BOOL loadTaskInvFile(const std::string& filename); void doInventoryCallback(); BOOL isOnMap(); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 9fb6da166e..725670d33f 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -803,14 +803,14 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c //------------------------------------------------------------------------ LLVOAvatar::~LLVOAvatar() { - if (!mFullyLoaded) - { + if (!mFullyLoaded) + { debugAvatarRezTime("AvatarRezLeftCloudNotification","left after ruth seconds as cloud"); - } - else - { + } + else + { debugAvatarRezTime("AvatarRezLeftNotification","left sometime after declouding"); - } + } logPendingPhases(); @@ -6024,6 +6024,11 @@ void LLVOAvatar::stopPhase(const std::string& phase_name, bool err_check) void LLVOAvatar::logPendingPhases() { + if (!isAgentAvatarValid()) + { + return; + } + for (LLViewerStats::phase_map_t::iterator it = getPhases().begin(); it != getPhases().end(); ++it) @@ -6058,6 +6063,11 @@ void LLVOAvatar::logPendingPhasesAllAvatars() void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapsed, bool completed) { + if (!isAgentAvatarValid()) + { + return; + } + LLSD record; record["timer_name"] = phase_name; record["avatar_id"] = getID(); @@ -6074,13 +6084,6 @@ void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapse record["is_using_server_bakes"] = ((bool) isUsingServerBakes()); record["is_self"] = isSelf(); - -#if 0 // verbose logging - std::ostringstream ostr; - ostr << LLSDNotationStreamer(record); - LL_DEBUGS("Avatar") << "record\n" << ostr.str() << llendl; -#endif - if (isAgentAvatarValid()) { gAgentAvatarp->addMetricsTimerRecord(record); diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 69248e26bc..e2b914aae8 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -367,10 +367,14 @@ class WindowsManifest(ViewerManifest): print err.message print "Skipping COLLADA and GLOD libraries (assumming linked statically)" - - # Get fmod dll, continue if missing - if not self.path("fmod.dll"): - print "Skipping fmod.dll" + # Get fmodex dll, continue if missing + try: + if self.args['configuration'].lower() == 'debug': + self.path("fmodexL.dll") + else: + self.path("fmodex.dll") + except: + print "Skipping fmodex audio library(assuming other audio engine)" # For textures if self.args['configuration'].lower() == 'debug': @@ -743,6 +747,7 @@ class DarwinManifest(ViewerManifest): "libcollada14dom.dylib", "libexpat.1.5.2.dylib", "libexception_handler.dylib", + "libfmodex.dylib", "libGLOD.dylib", ): dylibs += path_optional(os.path.join(libdir, libfile), libfile) @@ -757,11 +762,7 @@ class DarwinManifest(ViewerManifest): 'SLVoice', ): self.path2basename(libdir, libfile) - - # FMOD for sound - libfile = "libfmodwrapper.dylib" - path_optional(os.path.join(self.args['configuration'], libfile), libfile) - + # our apps for app_bld_dir, app in (("mac_crash_logger", "mac-crash-logger.app"), ("mac_updater", "mac-updater.app"), @@ -1122,11 +1123,13 @@ class Linux_i686Manifest(LinuxManifest): pass try: - self.path("libfmod-3.75.so") + self.path("libfmodex-*.so") + self.path("libfmodex.so") pass except: - print "Skipping libfmod-3.75.so - not found" + print "Skipping libfmodex.so - not found" pass + self.end_prefix("lib") # Vivox runtimes |