aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/CMakeLists.txt8
-rw-r--r--linden/indra/cmake/00-Common.cmake8
-rw-r--r--linden/indra/cmake/APR.cmake23
-rw-r--r--linden/indra/cmake/CopyWinLibs.cmake106
-rw-r--r--linden/indra/cmake/DirectX.cmake22
-rw-r--r--linden/indra/cmake/FindMono.cmake18
-rw-r--r--linden/indra/cmake/GStreamer.cmake2
-rw-r--r--linden/indra/cmake/GooglePerfTools.cmake6
-rw-r--r--linden/indra/cmake/LLAudio.cmake3
-rw-r--r--linden/indra/cmake/LLKDU.cmake20
-rw-r--r--linden/indra/cmake/LLXML.cmake2
-rw-r--r--linden/indra/cmake/Linking.cmake8
-rw-r--r--linden/indra/cmake/NDOF.cmake6
-rw-r--r--linden/indra/cmake/OPENAL.cmake85
-rw-r--r--linden/indra/cmake/Python.cmake1
-rw-r--r--linden/indra/cmake/QuickTime.cmake22
-rwxr-xr-xlinden/indra/develop.py125
-rw-r--r--linden/indra/llaudio/CMakeLists.txt19
-rw-r--r--linden/indra/llaudio/audioengine.cpp395
-rw-r--r--linden/indra/llaudio/audioengine.h161
-rw-r--r--linden/indra/llaudio/audioengine_fmod.cpp271
-rw-r--r--linden/indra/llaudio/audioengine_fmod.h31
-rw-r--r--linden/indra/llaudio/audioengine_openal.cpp544
-rw-r--r--linden/indra/llaudio/audioengine_openal.h112
-rw-r--r--linden/indra/llaudio/listener_fmod.h10
-rw-r--r--linden/indra/llaudio/listener_openal.cpp98
-rw-r--r--linden/indra/llaudio/listener_openal.h7
-rw-r--r--linden/indra/llaudio/llaudiodecodemgr.cpp23
-rw-r--r--linden/indra/llaudio/windgen.h138
-rw-r--r--linden/indra/llcommon/llversionviewer.h2
-rw-r--r--linden/indra/llmath/CMakeLists.txt4
-rw-r--r--linden/indra/llmath/llcalc.cpp155
-rw-r--r--linden/indra/llmath/llcalc.h85
-rw-r--r--linden/indra/llmath/llcalcparser.cpp45
-rw-r--r--linden/indra/llmath/llcalcparser.h155
-rw-r--r--linden/indra/llmedia/CMakeLists.txt20
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamer.cpp365
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamer.h15
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamer_syms.cpp4
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamer_syms.h4
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamervidplug.cpp28
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamervidplug.h5
-rw-r--r--linden/indra/llmedia/llmediamanager.cpp12
-rw-r--r--linden/indra/llui/lllineeditor.cpp33
-rw-r--r--linden/indra/llui/lllineeditor.h4
-rw-r--r--linden/indra/llui/llspinctrl.cpp17
-rw-r--r--linden/indra/llwindow/llwindowsdl.cpp4
-rw-r--r--linden/indra/newview/CMakeLists.txt60
-rw-r--r--linden/indra/newview/app_settings/logcontrol.xml7
-rw-r--r--linden/indra/newview/app_settings/settings.xml37
-rw-r--r--linden/indra/newview/llappviewer.cpp8
-rw-r--r--linden/indra/newview/llaudiosourcevo.cpp2
-rw-r--r--linden/indra/newview/llfloaterabout.cpp5
-rw-r--r--linden/indra/newview/llfloatersnapshot.cpp47
-rw-r--r--linden/indra/newview/llfloaterworldmap.cpp2
-rw-r--r--linden/indra/newview/llmaniptranslate.h2
-rw-r--r--linden/indra/newview/llnetmap.cpp19
-rw-r--r--linden/indra/newview/llpanelface.cpp31
-rw-r--r--linden/indra/newview/llpanelface.h1
-rw-r--r--linden/indra/newview/llpanelgeneral.cpp2
-rw-r--r--linden/indra/newview/llpanelgeneral.h1
-rw-r--r--linden/indra/newview/llpanelobject.cpp61
-rw-r--r--linden/indra/newview/llpanelobject.h1
-rw-r--r--linden/indra/newview/llpreviewlandmark.cpp10
-rw-r--r--linden/indra/newview/llpreviewsound.cpp3
-rw-r--r--linden/indra/newview/llstartup.cpp44
-rw-r--r--linden/indra/newview/llvieweraudio.cpp84
-rw-r--r--linden/indra/newview/llvieweraudio.h2
-rw-r--r--linden/indra/newview/llviewermenu.cpp58
-rw-r--r--linden/indra/newview/llviewermessage.cpp9
-rw-r--r--linden/indra/newview/llviewertexteditor.cpp3
-rw-r--r--linden/indra/newview/llviewerwindow.cpp4
-rw-r--r--linden/indra/newview/llvoavatar.cpp11
-rw-r--r--linden/indra/newview/llwindebug.cpp4
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/alerts.xml67
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml2
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_tools.xml48
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml13
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_pie_avatar.xml4
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_pie_land.xml6
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml82
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_pie_self.xml136
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml39
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml4
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml11
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/strings.xml363
-rw-r--r--linden/indra/newview/skins/silver/colors_base.xml4
-rwxr-xr-xlinden/indra/newview/viewer_manifest.py57
-rw-r--r--linden/install.xml130
89 files changed, 3350 insertions, 1365 deletions
diff --git a/linden/indra/CMakeLists.txt b/linden/indra/CMakeLists.txt
index eb06191..1453fe4 100644
--- a/linden/indra/CMakeLists.txt
+++ b/linden/indra/CMakeLists.txt
@@ -45,10 +45,6 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llvfs)
45add_subdirectory(${LIBS_OPEN_PREFIX}llwindow) 45add_subdirectory(${LIBS_OPEN_PREFIX}llwindow)
46add_subdirectory(${LIBS_OPEN_PREFIX}llxml) 46add_subdirectory(${LIBS_OPEN_PREFIX}llxml)
47 47
48if (EXISTS ${LIBS_CLOSED_DIR}llkdu AND NOT STANDALONE)
49 add_subdirectory(${LIBS_CLOSED_PREFIX}llkdu)
50endif (EXISTS ${LIBS_CLOSED_DIR}llkdu AND NOT STANDALONE)
51
52add_subdirectory(${LIBS_OPEN_PREFIX}lscript) 48add_subdirectory(${LIBS_OPEN_PREFIX}lscript)
53 49
54if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts) 50if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
@@ -69,7 +65,11 @@ if (VIEWER)
69 add_dependencies(viewer mac-updater mac-crash-logger) 65 add_dependencies(viewer mac-updater mac-crash-logger)
70 elseif (WINDOWS) 66 elseif (WINDOWS)
71 add_subdirectory(${VIEWER_PREFIX}win_crash_logger) 67 add_subdirectory(${VIEWER_PREFIX}win_crash_logger)
68 if (EXISTS ${VIEWER_PREFIX}win_setup)
69 add_subdirectory(${VIEWER_PREFIX}win_setup)
70 endif (EXISTS ${VIEWER_PREFIX}win_setup)
72 add_subdirectory(${VIEWER_PREFIX}win_updater) 71 add_subdirectory(${VIEWER_PREFIX}win_updater)
72 # add_dependencies(viewer windows-updater windows-setup windows-crash-logger)
73 add_dependencies(viewer windows-updater windows-crash-logger) 73 add_dependencies(viewer windows-updater windows-crash-logger)
74 elseif (SOLARIS) 74 elseif (SOLARIS)
75 add_subdirectory(solaris_crash_logger) 75 add_subdirectory(solaris_crash_logger)
diff --git a/linden/indra/cmake/00-Common.cmake b/linden/indra/cmake/00-Common.cmake
index 977e588..c41591f 100644
--- a/linden/indra/cmake/00-Common.cmake
+++ b/linden/indra/cmake/00-Common.cmake
@@ -49,6 +49,10 @@ if (WINDOWS)
49 ) 49 )
50 50
51 if(MSVC80 OR MSVC90) 51 if(MSVC80 OR MSVC90)
52 set(CMAKE_CXX_FLAGS_RELEASE
53 "${CMAKE_CXX_FLAGS_RELEASE} -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
54 CACHE STRING "C++ compiler release options" FORCE)
55
52 add_definitions( 56 add_definitions(
53 /Zc:wchar_t- 57 /Zc:wchar_t-
54 ) 58 )
@@ -165,6 +169,10 @@ if (DARWIN)
165 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}") 169 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
166 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch") 170 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch")
167 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch") 171 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch")
172 # NOTE: it's critical that the optimization flag is put in front.
173 # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
174 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
175 set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
168endif (DARWIN) 176endif (DARWIN)
169 177
170 178
diff --git a/linden/indra/cmake/APR.cmake b/linden/indra/cmake/APR.cmake
index 2a96d70..2563a98 100644
--- a/linden/indra/cmake/APR.cmake
+++ b/linden/indra/cmake/APR.cmake
@@ -15,24 +15,16 @@ if (STANDALONE)
15else (STANDALONE) 15else (STANDALONE)
16 use_prebuilt_binary(apr_suite) 16 use_prebuilt_binary(apr_suite)
17 if (WINDOWS) 17 if (WINDOWS)
18 set(WINLIBS_PREBUILT_DEBUG_DIR
19 ${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug
20 )
21 set(WINLIBS_PREBUILT_RELEASE_DIR
22 ${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release
23 )
24 set(APR_LIBRARIES 18 set(APR_LIBRARIES
25 debug ${WINLIBS_PREBUILT_DEBUG_DIR}/apr-1.lib 19 debug ${ARCH_PREBUILT_DIRS_DEBUG}/apr-1.lib
26 optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/apr-1.lib 20 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/apr-1.lib
27 ) 21 )
28 set(APRUTIL_LIBRARIES 22 set(APRUTIL_LIBRARIES
29 debug ${WINLIBS_PREBUILT_DEBUG_DIR}/aprutil-1.lib 23 debug ${ARCH_PREBUILT_DIRS_DEBUG}/aprutil-1.lib
30 optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/aprutil-1.lib 24 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/aprutil-1.lib
31 )
32 set(APRICONV_LIBRARIES
33 debug ${WINLIBS_PREBUILT_DEBUG_DIR}/apriconv-1.lib
34 optimized ${WINLIBS_PREBUILT_RELEASE_DIR}/apriconv-1.lib
35 ) 25 )
26 # Doesn't need to link with iconv.dll
27 set(APRICONV_LIBRARIES "")
36 elseif (DARWIN) 28 elseif (DARWIN)
37 set(APR_LIBRARIES 29 set(APR_LIBRARIES
38 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.a 30 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapr-1.a
@@ -42,10 +34,11 @@ else (STANDALONE)
42 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.a 34 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.a
43 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.a 35 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.a
44 ) 36 )
45 set(APRICONV_LIBRARIES apriconv-1) 37 set(APRICONV_LIBRARIES iconv)
46 else (WINDOWS) 38 else (WINDOWS)
47 set(APR_LIBRARIES apr-1) 39 set(APR_LIBRARIES apr-1)
48 set(APRUTIL_LIBRARIES aprutil-1) 40 set(APRUTIL_LIBRARIES aprutil-1)
41 set(APRICONV_LIBRARIES iconv)
49 endif (WINDOWS) 42 endif (WINDOWS)
50 set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/apr-1) 43 set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/apr-1)
51 44
diff --git a/linden/indra/cmake/CopyWinLibs.cmake b/linden/indra/cmake/CopyWinLibs.cmake
index 345761a..3d70c8f 100644
--- a/linden/indra/cmake/CopyWinLibs.cmake
+++ b/linden/indra/cmake/CopyWinLibs.cmake
@@ -14,7 +14,6 @@ set(vivox_files
14 ssleay32.dll 14 ssleay32.dll
15 SLVoiceAgent.exe 15 SLVoiceAgent.exe
16 srtp.dll 16 srtp.dll
17 alut.dll
18 vivoxsdk.dll 17 vivoxsdk.dll
19 ortp.dll 18 ortp.dll
20 wrap_oal.dll 19 wrap_oal.dll
@@ -22,12 +21,15 @@ set(vivox_files
22 21
23set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug") 22set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
24set(debug_files 23set(debug_files
24 alut.dll
25 freebl3.dll 25 freebl3.dll
26 gksvggdiplus.dll 26 gksvggdiplus.dll
27 js3250.dll 27 js3250.dll
28 nspr4.dll 28 nspr4.dll
29 nss3.dll 29 nss3.dll
30 nssckbi.dll 30 nssckbi.dll
31 openal32.dll
32 openjpegd.dll
31 plc4.dll 33 plc4.dll
32 plds4.dll 34 plds4.dll
33 smime3.dll 35 smime3.dll
@@ -35,7 +37,6 @@ set(debug_files
35 ssl3.dll 37 ssl3.dll
36 xpcom.dll 38 xpcom.dll
37 xul.dll 39 xul.dll
38 openjpegd.dll
39 windbgdlg.exe 40 windbgdlg.exe
40 ) 41 )
41 42
@@ -57,12 +58,15 @@ set(all_targets ${all_targets} ${out_targets})
57 58
58set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release") 59set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
59set(release_files 60set(release_files
61 alut.dll
60 freebl3.dll 62 freebl3.dll
61 gksvggdiplus.dll 63 gksvggdiplus.dll
62 js3250.dll 64 js3250.dll
63 nspr4.dll 65 nspr4.dll
64 nss3.dll 66 nss3.dll
65 nssckbi.dll 67 nssckbi.dll
68 openal32.dll
69 openjpeg.dll
66 plc4.dll 70 plc4.dll
67 plds4.dll 71 plds4.dll
68 smime3.dll 72 smime3.dll
@@ -70,7 +74,6 @@ set(release_files
70 ssl3.dll 74 ssl3.dll
71 xpcom.dll 75 xpcom.dll
72 xul.dll 76 xul.dll
73 openjpeg.dll
74 ) 77 )
75 78
76copy_if_different( 79copy_if_different(
@@ -105,51 +108,60 @@ copy_if_different(
105 ) 108 )
106set(all_targets ${all_targets} ${out_targets}) 109set(all_targets ${all_targets} ${out_targets})
107 110
108set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu") 111
109if(EXISTS ${internal_llkdu_path}) 112# Copy MS C runtime dlls, required for packaging.
110 set(internal_llkdu_src "${CMAKE_BINARY_DIR}/llkdu/${CMAKE_CFG_INTDIR}/llkdu.dll") 113# *TODO - Adapt this to support VC9
111 set(llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llkdu.dll") 114if (MSVC80)
112 ADD_CUSTOM_COMMAND( 115 FIND_PATH(debug_msvc8_redist_path msvcr80d.dll
113 OUTPUT ${llkdu_dst} 116 PATHS
114 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${internal_llkdu_src} ${llkdu_dst} 117 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT
115 DEPENDS ${internal_llkdu_src}
116 COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}"
117 )
118 set(all_targets ${all_targets} ${llkdu_dst})
119else(EXISTS ${internal_llkdu_path})
120 set(debug_llkdu_src "${debug_src_dir}/llkdu.dll")
121 set(debug_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/Debug/llkdu.dll")
122 ADD_CUSTOM_COMMAND(
123 OUTPUT ${debug_llkdu_dst}
124 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${debug_llkdu_src} ${debug_llkdu_dst}
125 DEPENDS ${debug_llkdu_src}
126 COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/Debug"
127 )
128 set(all_targets ${all_targets} ${debug_llkdu_dst})
129
130 set(release_llkdu_src "${release_src_dir}/llkdu.dll")
131 set(release_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/Release/llkdu.dll")
132 ADD_CUSTOM_COMMAND(
133 OUTPUT ${release_llkdu_dst}
134 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${release_llkdu_dst}
135 DEPENDS ${release_llkdu_src}
136 COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/Release"
137 ) 118 )
138 set(all_targets ${all_targets} ${release_llkdu_dst}) 119
139 120 if(EXISTS ${debug_msvc8_redist_path})
140 set(relwithdebinfo_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llkdu.dll") 121 set(debug_msvc8_files
141 ADD_CUSTOM_COMMAND( 122 msvcr80d.dll
142 OUTPUT ${relwithdebinfo_llkdu_dst} 123 msvcp80d.dll
143 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${relwithdebinfo_llkdu_dst} 124 Microsoft.VC80.DebugCRT.manifest
144 DEPENDS ${release_llkdu_src} 125 )
145 COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo" 126
127 copy_if_different(
128 ${debug_msvc8_redist_path}
129 "${CMAKE_CURRENT_BINARY_DIR}/Debug"
130 out_targets
131 ${debug_msvc8_files}
132 )
133 set(all_targets ${all_targets} ${out_targets})
134 endif (EXISTS ${debug_msvc8_redist_path})
135
136 FIND_PATH(release_msvc8_redist_path msvcr80.dll
137 PATHS
138 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT
146 ) 139 )
147 set(all_targets ${all_targets} ${relwithdebinfo_llkdu_dst})
148
149endif (EXISTS ${internal_llkdu_path})
150 140
151add_custom_target(copy_win_libs ALL DEPENDS ${all_targets}) 141 if(EXISTS ${release_msvc8_redist_path})
142 set(release_msvc8_files
143 msvcr80.dll
144 msvcp80.dll
145 Microsoft.VC80.CRT.manifest
146 )
152 147
153if(EXISTS ${internal_llkdu_path}) 148 copy_if_different(
154 add_dependencies(copy_win_libs llkdu) 149 ${release_msvc8_redist_path}
155endif(EXISTS ${internal_llkdu_path}) 150 "${CMAKE_CURRENT_BINARY_DIR}/Release"
151 out_targets
152 ${release_msvc8_files}
153 )
154 set(all_targets ${all_targets} ${out_targets})
155
156 copy_if_different(
157 ${release_msvc8_redist_path}
158 "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
159 out_targets
160 ${release_msvc8_files}
161 )
162 set(all_targets ${all_targets} ${out_targets})
163
164 endif (EXISTS ${release_msvc8_redist_path})
165endif (MSVC80)
166
167add_custom_target(copy_win_libs ALL DEPENDS ${all_targets})
diff --git a/linden/indra/cmake/DirectX.cmake b/linden/indra/cmake/DirectX.cmake
index 4d2d5e0..d406f37 100644
--- a/linden/indra/cmake/DirectX.cmake
+++ b/linden/indra/cmake/DirectX.cmake
@@ -3,12 +3,13 @@
3if (VIEWER AND WINDOWS) 3if (VIEWER AND WINDOWS)
4 find_path(DIRECTX_INCLUDE_DIR dxdiag.h 4 find_path(DIRECTX_INCLUDE_DIR dxdiag.h
5 "$ENV{DXSDK_DIR}/Include" 5 "$ENV{DXSDK_DIR}/Include"
6 "C:/Program Files/Microsoft DirectX SDK (June 2008)/Include" 6 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Include"
7 "C:/Program Files/Microsoft DirectX SDK (March 2008)/Include" 7 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Include"
8 "C:/Program Files/Microsoft DirectX SDK (November 2007)/Include" 8 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Include"
9 "C:/Program Files/Microsoft DirectX SDK (August 2007)/Include" 9 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Include"
10 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Include"
10 "C:/DX90SDK/Include" 11 "C:/DX90SDK/Include"
11 "C:/Program Files/DX90SDK/Include" 12 "$ENV{PROGRAMFILES}/DX90SDK/Include"
12 ) 13 )
13 if (DIRECTX_INCLUDE_DIR) 14 if (DIRECTX_INCLUDE_DIR)
14 include_directories(${DIRECTX_INCLUDE_DIR}) 15 include_directories(${DIRECTX_INCLUDE_DIR})
@@ -22,12 +23,13 @@ if (VIEWER AND WINDOWS)
22 23
23 find_path(DIRECTX_LIBRARY_DIR dxguid.lib 24 find_path(DIRECTX_LIBRARY_DIR dxguid.lib
24 "$ENV{DXSDK_DIR}/Lib/x86" 25 "$ENV{DXSDK_DIR}/Lib/x86"
25 "C:/Program Files/Microsoft DirectX SDK (June 2008)/Lib/x86" 26 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Lib/x86"
26 "C:/Program Files/Microsoft DirectX SDK (March 2008)/Lib/x86" 27 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Lib/x86"
27 "C:/Program Files/Microsoft DirectX SDK (November 2007)/Lib/x86" 28 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Lib/x86"
28 "C:/Program Files/Microsoft DirectX SDK (August 2007)/Lib/x86" 29 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Lib/x86"
30 "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Lib/x86"
29 "C:/DX90SDK/Lib" 31 "C:/DX90SDK/Lib"
30 "C:/Program Files/DX90SDK/Lib" 32 "$ENV{PROGRAMFILES}/DX90SDK/Lib"
31 ) 33 )
32 if (DIRECTX_LIBRARY_DIR) 34 if (DIRECTX_LIBRARY_DIR)
33 if (DIRECTX_FIND_QUIETLY) 35 if (DIRECTX_FIND_QUIETLY)
diff --git a/linden/indra/cmake/FindMono.cmake b/linden/indra/cmake/FindMono.cmake
index f0a0705..c36d725 100644
--- a/linden/indra/cmake/FindMono.cmake
+++ b/linden/indra/cmake/FindMono.cmake
@@ -14,29 +14,29 @@
14# Removed the check for gmcs 14# Removed the check for gmcs
15 15
16FIND_PROGRAM (MONO_EXECUTABLE mono 16FIND_PROGRAM (MONO_EXECUTABLE mono
17 "C:/Program Files/Mono-1.9.1/bin" 17 "$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
18 "C:/Program Files/Mono-1.2.6/bin" 18 "$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
19 /bin 19 /bin
20 /usr/bin 20 /usr/bin
21 /usr/local/bin 21 /usr/local/bin
22) 22)
23FIND_PROGRAM (MCS_EXECUTABLE mcs 23FIND_PROGRAM (MCS_EXECUTABLE mcs
24 "C:/Program Files/Mono-1.9.1/bin" 24 "$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
25 "C:/Program Files/Mono-1.2.6/bin" 25 "$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
26 /bin 26 /bin
27 /usr/bin 27 /usr/bin
28 /usr/local/bin 28 /usr/local/bin
29) 29)
30FIND_PROGRAM (GMCS_EXECUTABLE gmcs 30FIND_PROGRAM (GMCS_EXECUTABLE gmcs
31 "C:/Program Files/Mono-1.9.1/bin" 31 "$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
32 "C:/Program Files/Mono-1.2.6/bin" 32 "$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
33 /bin 33 /bin
34 /usr/bin 34 /usr/bin
35 /usr/local/bin 35 /usr/local/bin
36) 36)
37FIND_PROGRAM (GACUTIL_EXECUTABLE gacutil 37FIND_PROGRAM (GACUTIL_EXECUTABLE gacutil
38 "C:/Program Files/Mono-1.9.1/bin" 38 "$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
39 "C:/Program Files/Mono-1.2.6/bin" 39 "$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
40 /bin 40 /bin
41 /usr/bin 41 /usr/bin
42 /usr/local/bin 42 /usr/local/bin
@@ -44,7 +44,7 @@ FIND_PROGRAM (GACUTIL_EXECUTABLE gacutil
44FIND_PROGRAM (ILASM_EXECUTABLE 44FIND_PROGRAM (ILASM_EXECUTABLE
45 ilasm 45 ilasm
46 NO_DEFAULT_PATH 46 NO_DEFAULT_PATH
47 PATHS "C:/Program Files/Mono-1.9.1/bin" "C:/Apps/Mono-1.2.6/bin" "C:/Program Files/Mono-1.2.6/bin" /bin /usr/bin /usr/local/bin 47 PATHS "$ENV{PROGRAMFILES}/Mono-1.9.1/bin" "$ENV{PROGRAMFILES}/Mono-1.2.6/bin" /bin /usr/bin /usr/local/bin
48) 48)
49 49
50SET (MONO_FOUND FALSE) 50SET (MONO_FOUND FALSE)
diff --git a/linden/indra/cmake/GStreamer.cmake b/linden/indra/cmake/GStreamer.cmake
index 10d5207..4369445 100644
--- a/linden/indra/cmake/GStreamer.cmake
+++ b/linden/indra/cmake/GStreamer.cmake
@@ -15,6 +15,8 @@ elseif (LINUX)
15 set(GSTREAMER_INCLUDE_DIRS 15 set(GSTREAMER_INCLUDE_DIRS
16 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gstreamer-0.10 16 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gstreamer-0.10
17 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0 17 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0
18 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0/glib
19 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0/gobject
18 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/libxml2 20 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/libxml2
19 ) 21 )
20 # We don't need to explicitly link against gstreamer itself, because 22 # We don't need to explicitly link against gstreamer itself, because
diff --git a/linden/indra/cmake/GooglePerfTools.cmake b/linden/indra/cmake/GooglePerfTools.cmake
index 9b3eca0..25e9f6d 100644
--- a/linden/indra/cmake/GooglePerfTools.cmake
+++ b/linden/indra/cmake/GooglePerfTools.cmake
@@ -19,10 +19,14 @@ if (GOOGLE_PERFTOOLS_FOUND)
19 set(USE_GOOGLE_PERFTOOLS ON CACHE BOOL "Build with Google PerfTools support.") 19 set(USE_GOOGLE_PERFTOOLS ON CACHE BOOL "Build with Google PerfTools support.")
20endif (GOOGLE_PERFTOOLS_FOUND) 20endif (GOOGLE_PERFTOOLS_FOUND)
21 21
22# XXX Disable temporarily, until we have compilation issues on 64-bit
23# Etch sorted.
24set(USE_GOOGLE_PERFTOOLS OFF)
25
22if (USE_GOOGLE_PERFTOOLS) 26if (USE_GOOGLE_PERFTOOLS)
23 set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1) 27 set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1)
24 include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR}) 28 include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR})
25 set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES} ${STACKTRACE_LIBRARIES}) 29 set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES} ${STACKTRACE_LIBRARIES} ${PROFILER_LIBRARIES})
26else (USE_GOOGLE_PERFTOOLS) 30else (USE_GOOGLE_PERFTOOLS)
27 set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) 31 set(TCMALLOC_FLAG -ULL_USE_TCMALLOC)
28endif (USE_GOOGLE_PERFTOOLS) 32endif (USE_GOOGLE_PERFTOOLS)
diff --git a/linden/indra/cmake/LLAudio.cmake b/linden/indra/cmake/LLAudio.cmake
index 7b9f254..dcfd269 100644
--- a/linden/indra/cmake/LLAudio.cmake
+++ b/linden/indra/cmake/LLAudio.cmake
@@ -1,9 +1,11 @@
1# -*- cmake -*- 1# -*- cmake -*-
2 2
3include(Audio) 3include(Audio)
4include(OPENAL)
4 5
5set(LLAUDIO_INCLUDE_DIRS 6set(LLAUDIO_INCLUDE_DIRS
6 ${LIBS_OPEN_DIR}/llaudio 7 ${LIBS_OPEN_DIR}/llaudio
8 ${OPENAL_INCLUDE_DIRS}
7 ) 9 )
8 10
9set(LLAUDIO_LIBRARIES 11set(LLAUDIO_LIBRARIES
@@ -12,4 +14,5 @@ set(LLAUDIO_LIBRARIES
12 ${VORBISFILE_LIBRARIES} 14 ${VORBISFILE_LIBRARIES}
13 ${VORBIS_LIBRARIES} 15 ${VORBIS_LIBRARIES}
14 ${OGG_LIBRARIES} 16 ${OGG_LIBRARIES}
17 ${OPENAL_LIBRARIES}
15 ) 18 )
diff --git a/linden/indra/cmake/LLKDU.cmake b/linden/indra/cmake/LLKDU.cmake
deleted file mode 100644
index a02b5d9..0000000
--- a/linden/indra/cmake/LLKDU.cmake
+++ /dev/null
@@ -1,20 +0,0 @@
1# -*- cmake -*-
2include(Prebuilt)
3
4if (NOT STANDALONE AND EXISTS ${LIBS_CLOSED_DIR}/llkdu)
5 use_prebuilt_binary(kdu)
6 if (WINDOWS)
7 set(KDU_LIBRARY debug kdu_cored optimized kdu_core)
8 elseif (LINUX)
9 set(KDU_LIBRARY kdu_v42R)
10 else (WINDOWS)
11 set(KDU_LIBRARY kdu)
12 endif (WINDOWS)
13
14 set(KDU_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
15
16 set(LLKDU_LIBRARY llkdu)
17 set(LLKDU_STATIC_LIBRARY llkdu_static)
18 set(LLKDU_LIBRARIES ${LLKDU_LIBRARY})
19 set(LLKDU_STATIC_LIBRARIES ${LLKDU_STATIC_LIBRARY})
20endif (NOT STANDALONE AND EXISTS ${LIBS_CLOSED_DIR}/llkdu)
diff --git a/linden/indra/cmake/LLXML.cmake b/linden/indra/cmake/LLXML.cmake
index 1ce93c0..dd2ebca 100644
--- a/linden/indra/cmake/LLXML.cmake
+++ b/linden/indra/cmake/LLXML.cmake
@@ -1,9 +1,11 @@
1# -*- cmake -*- 1# -*- cmake -*-
2 2
3include(Boost)
3include(EXPAT) 4include(EXPAT)
4 5
5set(LLXML_INCLUDE_DIRS 6set(LLXML_INCLUDE_DIRS
6 ${LIBS_OPEN_DIR}/llxml 7 ${LIBS_OPEN_DIR}/llxml
8 ${Boost_INCLUDE_DIRS}
7 ${EXPAT_INCLUDE_DIRS} 9 ${EXPAT_INCLUDE_DIRS}
8 ) 10 )
9 11
diff --git a/linden/indra/cmake/Linking.cmake b/linden/indra/cmake/Linking.cmake
index c9748e3..167c5dd 100644
--- a/linden/indra/cmake/Linking.cmake
+++ b/linden/indra/cmake/Linking.cmake
@@ -7,15 +7,15 @@ if (NOT STANDALONE)
7 set(ARCH_PREBUILT_DIRS_DEBUG ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/debug) 7 set(ARCH_PREBUILT_DIRS_DEBUG ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/debug)
8 elseif (LINUX) 8 elseif (LINUX)
9 if (VIEWER) 9 if (VIEWER)
10 set(ARCH_PREBUILT_DIRS 10 set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release_client)
11 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release_client)
12 set(ARCH_PREBUILT_DIRS_RELEASE ${ARCH_PREBUILT_DIRS})
13 set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS})
14 else (VIEWER) 11 else (VIEWER)
15 set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release) 12 set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release)
16 endif (VIEWER) 13 endif (VIEWER)
14 set(ARCH_PREBUILT_DIRS_RELEASE ${ARCH_PREBUILT_DIRS})
15 set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS})
17 elseif (DARWIN) 16 elseif (DARWIN)
18 set(ARCH_PREBUILT_DIRS_RELEASE ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release) 17 set(ARCH_PREBUILT_DIRS_RELEASE ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release)
18 set(ARCH_PREBUILT_DIRS ${ARCH_PREBUILT_DIRS_RELEASE})
19 set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS_RELEASE}) 19 set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS_RELEASE})
20 endif (WINDOWS) 20 endif (WINDOWS)
21endif (NOT STANDALONE) 21endif (NOT STANDALONE)
diff --git a/linden/indra/cmake/NDOF.cmake b/linden/indra/cmake/NDOF.cmake
index 3f715a2..dad74e9 100644
--- a/linden/indra/cmake/NDOF.cmake
+++ b/linden/indra/cmake/NDOF.cmake
@@ -3,12 +3,12 @@ include(Prebuilt)
3 3
4use_prebuilt_binary(ndofdev) 4use_prebuilt_binary(ndofdev)
5 5
6if (WINDOWS OR DARWIN) 6if (WINDOWS OR DARWIN OR LINUX)
7 add_definitions(-DLIB_NDOF=1) 7 add_definitions(-DLIB_NDOF=1)
8endif (WINDOWS OR DARWIN) 8endif (WINDOWS OR DARWIN OR LINUX)
9 9
10if (WINDOWS) 10if (WINDOWS)
11 set(NDOF_LIBRARY libndofdev) 11 set(NDOF_LIBRARY libndofdev)
12elseif (DARWIN) 12elseif (DARWIN OR LINUX)
13 set(NDOF_LIBRARY ndofdev) 13 set(NDOF_LIBRARY ndofdev)
14endif (WINDOWS) 14endif (WINDOWS)
diff --git a/linden/indra/cmake/OPENAL.cmake b/linden/indra/cmake/OPENAL.cmake
new file mode 100644
index 0000000..a2bae5d
--- /dev/null
+++ b/linden/indra/cmake/OPENAL.cmake
@@ -0,0 +1,85 @@
1# -*- cmake -*-
2
3set(OPENAL ON CACHE BOOL "Enable OpenAL")
4
5
6if (OPENAL)
7
8 # message(STATUS "Building with OpenAL audio support")
9
10 # OPENAL_LIB
11
12 find_library(OPENAL_LIB
13 NAMES openal OpenAL OpenAL32 wrap_oal
14 PATHS ${ARCH_PREBUILT_DIRS_RELEASE}
15 )
16
17 if (NOT OPENAL_LIB)
18 message(FATAL_ERROR "OpenAL not found!")
19 else (NOT OPENAL_LIB)
20 # message(STATUS "OpenAL found: ${OPENAL_LIB}")
21 endif (NOT OPENAL_LIB)
22
23
24
25 # OPENAL_INCLUDE_DIR
26
27 find_path(OPENAL_INCLUDE_DIR
28 NAMES al.h
29 PATHS ${LIBS_PREBUILT_DIR}/include /usr/include/AL
30 )
31
32 if (NOT OPENAL_INCLUDE_DIR)
33 message(FATAL_ERROR "al.h not found!")
34 else (NOT OPENAL_INCLUDE_DIR)
35 # message(STATUS "al.h found in: ${OPENAL_INCLUDE_DIR}")
36 endif (NOT OPENAL_INCLUDE_DIR)
37
38
39
40 # ALUT_LIB
41
42 find_library(ALUT_LIB
43 NAMES alut freealut
44 PATHS ${ARCH_PREBUILT_DIRS_RELEASE}
45 )
46
47 if (NOT ALUT_LIB)
48 message(FATAL_ERROR "ALUT not found!")
49 else (NOT ALUT_LIB)
50 # message(STATUS "ALUT found: ${ALUT_LIB}")
51 endif (NOT ALUT_LIB)
52
53
54
55 # ALUT_INCLUDE_DIR
56
57 find_path(ALUT_INCLUDE_DIR
58 NAMES alut.h
59 PATHS ${LIBS_PREBUILT_DIR}/include /usr/include/AL
60 )
61
62 if (NOT ALUT_INCLUDE_DIR)
63 message(FATAL_ERROR "alut.h not found!")
64 else (NOT ALUT_INCLUDE_DIR)
65 # message(STATUS "alut.h found in: ${ALUT_INCLUDE_DIR}")
66 endif (NOT ALUT_INCLUDE_DIR)
67
68
69
70 set(OPENAL_LIBRARIES
71 ${OPENAL_LIB}
72 ${ALUT_LIB}
73 )
74
75 set(OPENAL_INCLUDE_DIRS
76 ${OPENAL_INCLUDE_DIR}
77 ${ALUT_INCLUDE_DIR}
78 )
79
80
81 set(OPENAL_FOUND TRUE CACHE BOOL
82 "Found OpenAL and ALUT libraries successfully"
83 )
84
85endif (OPENAL)
diff --git a/linden/indra/cmake/Python.cmake b/linden/indra/cmake/Python.cmake
index e9505fb..4f86d32 100644
--- a/linden/indra/cmake/Python.cmake
+++ b/linden/indra/cmake/Python.cmake
@@ -9,6 +9,7 @@ if (WINDOWS)
9 NAMES python25.exe python23.exe python.exe 9 NAMES python25.exe python23.exe python.exe
10 NO_DEFAULT_PATH # added so that cmake does not find cygwin python 10 NO_DEFAULT_PATH # added so that cmake does not find cygwin python
11 PATHS 11 PATHS
12 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
12 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath] 13 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
13 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath] 14 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
14 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath] 15 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
diff --git a/linden/indra/cmake/QuickTime.cmake b/linden/indra/cmake/QuickTime.cmake
index b79ac11..4352709 100644
--- a/linden/indra/cmake/QuickTime.cmake
+++ b/linden/indra/cmake/QuickTime.cmake
@@ -9,13 +9,29 @@ if (DARWIN)
9 include(CMakeFindFrameworks) 9 include(CMakeFindFrameworks)
10 find_library(QUICKTIME_LIBRARY QuickTime) 10 find_library(QUICKTIME_LIBRARY QuickTime)
11elseif (WINDOWS) 11elseif (WINDOWS)
12 set(QUICKTIME_SDK_DIR "C:\\Program Files\\QuickTime SDK" 12 set(QUICKTIME_SDK_DIR "$ENV{PROGRAMFILES}/QuickTime SDK"
13 CACHE PATH "Location of the QuickTime SDK.") 13 CACHE PATH "Location of the QuickTime SDK.")
14 find_library(QUICKTIME_LIBRARY qtmlclient 14
15 find_library(DEBUG_QUICKTIME_LIBRARY qtmlclient
16 PATHS
17 ${ARCH_PREBUILT_DIRS_DEBUG}
18 "${QUICKTIME_SDK_DIR}\\libraries"
19 )
20
21 find_library(RELEASE_QUICKTIME_LIBRARY qtmlclient
15 PATHS 22 PATHS
16 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/release 23 ${ARCH_PREBUILT_DIRS_RELEASE}
17 "${QUICKTIME_SDK_DIR}\\libraries" 24 "${QUICKTIME_SDK_DIR}\\libraries"
18 ) 25 )
26
27 if (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)
28 set(QUICKTIME_LIBRARY
29 optimized ${RELEASE_QUICKTIME_LIBRARY}
30 debug ${DEBUG_QUICKTIME_LIBRARY}
31 )
32
33 endif (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY)
34
19 include_directories( 35 include_directories(
20 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/quicktime 36 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/quicktime
21 "${QUICKTIME_SDK_DIR}\\CIncludes" 37 "${QUICKTIME_SDK_DIR}\\CIncludes"
diff --git a/linden/indra/develop.py b/linden/indra/develop.py
index a0b11c6..830f74d 100755
--- a/linden/indra/develop.py
+++ b/linden/indra/develop.py
@@ -53,6 +53,16 @@ def mkdir(path):
53 if err.errno != errno.EEXIST or not os.path.isdir(path): 53 if err.errno != errno.EEXIST or not os.path.isdir(path):
54 raise 54 raise
55 55
56def getcwd():
57 cwd = os.getcwd()
58 if 'a' <= cwd[0] <= 'z' and cwd[1] == ':':
59 # CMake wants DOS drive letters to be in uppercase. The above
60 # condition never asserts on platforms whose full path names
61 # always begin with a slash, so we don't need to test whether
62 # we are running on Windows.
63 cwd = cwd[0].upper() + cwd[1:]
64 return cwd
65
56def quote(opts): 66def quote(opts):
57 return '"' + '" "'.join([ opt.replace('"', '') for opt in opts ]) + '"' 67 return '"' + '" "'.join([ opt.replace('"', '') for opt in opts ]) + '"'
58 68
@@ -65,6 +75,7 @@ class PlatformSetup(object):
65 build_type = build_types['relwithdebinfo'] 75 build_type = build_types['relwithdebinfo']
66 standalone = 'FALSE' 76 standalone = 'FALSE'
67 unattended = 'FALSE' 77 unattended = 'FALSE'
78 project_name = 'Imprudence'
68 distcc = True 79 distcc = True
69 cmake_opts = [] 80 cmake_opts = []
70 81
@@ -141,7 +152,7 @@ class PlatformSetup(object):
141 # do a sanity check to make sure we have a generator 152 # do a sanity check to make sure we have a generator
142 if not hasattr(self, 'generator'): 153 if not hasattr(self, 'generator'):
143 raise "No generator available for '%s'" % (self.__name__,) 154 raise "No generator available for '%s'" % (self.__name__,)
144 cwd = os.getcwd() 155 cwd = getcwd()
145 created = [] 156 created = []
146 try: 157 try:
147 for d in self.build_dirs(): 158 for d in self.build_dirs():
@@ -223,6 +234,10 @@ class UnixSetup(PlatformSetup):
223class LinuxSetup(UnixSetup): 234class LinuxSetup(UnixSetup):
224 def __init__(self): 235 def __init__(self):
225 super(LinuxSetup, self).__init__() 236 super(LinuxSetup, self).__init__()
237 try:
238 self.debian_sarge = open('/etc/debian_version').read().strip() == '3.1'
239 except:
240 self.debian_sarge = False
226 241
227 def os(self): 242 def os(self):
228 return 'linux' 243 return 'linux'
@@ -230,10 +245,17 @@ class LinuxSetup(UnixSetup):
230 def build_dirs(self): 245 def build_dirs(self):
231 # Only build the server code if (a) we have it and (b) we're 246 # Only build the server code if (a) we have it and (b) we're
232 # on 32-bit x86. 247 # on 32-bit x86.
248 platform_build = '%s-%s' % (self.platform(), self.build_type.lower())
249
233 if self.arch() == 'i686' and self.is_internal_tree(): 250 if self.arch() == 'i686' and self.is_internal_tree():
234 return ['viewer-' + self.platform(), 'server-' + self.platform()] 251 return ['viewer-' + platform_build, 'server-' + platform_build]
252 elif self.arch() == 'x86_64' and self.is_internal_tree():
253 # the viewer does not build in 64bit -- kdu5 issues
254 # we can either use openjpeg, or overhaul our viewer to handle kdu5 or higher
255 # doug knows about kdu issues
256 return ['server-' + platform_build]
235 else: 257 else:
236 return ['viewer-' + self.platform()] 258 return ['viewer-' + platform_build]
237 259
238 def find_in_path(self, name, defval=None, basename=False): 260 def find_in_path(self, name, defval=None, basename=False):
239 for p in os.getenv('PATH', '/usr/bin').split(':'): 261 for p in os.getenv('PATH', '/usr/bin').split(':'):
@@ -251,7 +273,8 @@ class LinuxSetup(UnixSetup):
251 opts=quote(opts), 273 opts=quote(opts),
252 standalone=self.standalone, 274 standalone=self.standalone,
253 unattended=self.unattended, 275 unattended=self.unattended,
254 type=self.build_type.upper() 276 type=self.build_type.upper(),
277 project_name=self.project_name
255 ) 278 )
256 if not self.is_internal_tree(): 279 if not self.is_internal_tree():
257 args.update({'cxx':'g++', 'server':'FALSE', 'viewer':'TRUE'}) 280 args.update({'cxx':'g++', 'server':'FALSE', 'viewer':'TRUE'})
@@ -263,22 +286,20 @@ class LinuxSetup(UnixSetup):
263 distcc = [] 286 distcc = []
264 baseonly = False 287 baseonly = False
265 if 'server' in build_dir: 288 if 'server' in build_dir:
266 gcc33 = distcc + self.find_in_path('g++-3.3', 'g++', baseonly) 289 gcc = distcc + self.find_in_path(
267 args.update({'cxx':' '.join(gcc33), 'server':'TRUE', 290 self.debian_sarge and 'g++-3.3' or 'g++-4.1',
268 'viewer':'FALSE'}) 291 'g++', baseonly)
292 args.update({'cxx': ' '.join(gcc), 'server': 'TRUE',
293 'viewer': 'FALSE'})
269 else: 294 else:
270 gcc41 = distcc + self.find_in_path('g++-4.1', 'g++', baseonly) 295 gcc41 = distcc + self.find_in_path('g++-4.1', 'g++', baseonly)
271 args.update({'cxx': ' '.join(gcc41), 'server':'FALSE', 296 args.update({'cxx': ' '.join(gcc41), 'server':'FALSE',
272 'viewer':'TRUE'}) 297 'viewer':'TRUE'})
273 #if simple:
274 # return (('cmake %(opts)s '
275 # '-DSERVER:BOOL=%(server)s '
276 # '-DVIEWER:BOOL=%(viewer)s '
277 # '%(dir)r') % args)
278 cmd = (('cmake -DCMAKE_BUILD_TYPE:STRING=%(type)s ' 298 cmd = (('cmake -DCMAKE_BUILD_TYPE:STRING=%(type)s '
279 '-G %(generator)r -DSERVER:BOOL=%(server)s ' 299 '-G %(generator)r -DSERVER:BOOL=%(server)s '
280 '-DVIEWER:BOOL=%(viewer)s -DSTANDALONE:BOOL=%(standalone)s ' 300 '-DVIEWER:BOOL=%(viewer)s -DSTANDALONE:BOOL=%(standalone)s '
281 '-DUNATTENDED:BOOL=%(unattended)s ' 301 '-DUNATTENDED:BOOL=%(unattended)s '
302 '-DROOT_PROJECT_NAME:STRING=%(project_name)s '
282 '%(opts)s %(dir)r') 303 '%(opts)s %(dir)r')
283 % args) 304 % args)
284 if 'CXX' not in os.environ: 305 if 'CXX' not in os.environ:
@@ -381,6 +402,7 @@ class DarwinSetup(UnixSetup):
381 opts=quote(opts), 402 opts=quote(opts),
382 standalone=self.standalone, 403 standalone=self.standalone,
383 unattended=self.unattended, 404 unattended=self.unattended,
405 project_name=self.project_name,
384 universal='', 406 universal='',
385 type=self.build_type.upper() 407 type=self.build_type.upper()
386 ) 408 )
@@ -392,11 +414,12 @@ class DarwinSetup(UnixSetup):
392 '-DCMAKE_BUILD_TYPE:STRING=%(type)s ' 414 '-DCMAKE_BUILD_TYPE:STRING=%(type)s '
393 '-DSTANDALONE:BOOL=%(standalone)s ' 415 '-DSTANDALONE:BOOL=%(standalone)s '
394 '-DUNATTENDED:BOOL=%(unattended)s ' 416 '-DUNATTENDED:BOOL=%(unattended)s '
417 '-DROOT_PROJECT_NAME:STRING=%(project_name)s '
395 '%(universal)s ' 418 '%(universal)s '
396 '%(opts)s %(dir)r' % args) 419 '%(opts)s %(dir)r' % args)
397 420
398 def run_build(self, opts, targets): 421 def run_build(self, opts, targets):
399 cwd = os.getcwd() 422 cwd = getcwd()
400 if targets: 423 if targets:
401 targets = ' '.join(['-target ' + repr(t) for t in targets]) 424 targets = ' '.join(['-target ' + repr(t) for t in targets])
402 else: 425 else:
@@ -439,7 +462,7 @@ class WindowsSetup(PlatformSetup):
439 462
440 def _get_generator(self): 463 def _get_generator(self):
441 if self._generator is None: 464 if self._generator is None:
442 for version in 'vc71 vc80 vc90'.split(): 465 for version in 'vc80 vc90 vc71'.split():
443 if self.find_visual_studio(version): 466 if self.find_visual_studio(version):
444 self._generator = version 467 self._generator = version
445 print 'Building with ', self.gens[version]['gen'] 468 print 'Building with ', self.gens[version]['gen']
@@ -467,12 +490,14 @@ class WindowsSetup(PlatformSetup):
467 opts=quote(opts), 490 opts=quote(opts),
468 standalone=self.standalone, 491 standalone=self.standalone,
469 unattended=self.unattended, 492 unattended=self.unattended,
493 project_name=self.project_name
470 ) 494 )
471 #if simple: 495 #if simple:
472 # return 'cmake %(opts)s "%(dir)s"' % args 496 # return 'cmake %(opts)s "%(dir)s"' % args
473 return ('cmake -G "%(generator)s" ' 497 return ('cmake -G "%(generator)s" '
474 '-DSTANDALONE:BOOL=%(standalone)s ' 498 '-DSTANDALONE:BOOL=%(standalone)s '
475 '-DUNATTENDED:BOOL=%(unattended)s ' 499 '-DUNATTENDED:BOOL=%(unattended)s '
500 '-DROOT_PROJECT_NAME:STRING=%(project_name)s '
476 '%(opts)s "%(dir)s"' % args) 501 '%(opts)s "%(dir)s"' % args)
477 502
478 def find_visual_studio(self, gen=None): 503 def find_visual_studio(self, gen=None):
@@ -503,11 +528,11 @@ class WindowsSetup(PlatformSetup):
503 if self.gens[self.generator]['ver'] in [ r'8.0', r'9.0' ]: 528 if self.gens[self.generator]['ver'] in [ r'8.0', r'9.0' ]:
504 config = '\"%s|Win32\"' % config 529 config = '\"%s|Win32\"' % config
505 530
506 return "buildconsole Imprudence.sln /build %s" % config 531 return "buildconsole %s.sln /build %s" % (self.project_name, config)
507 532
508 # devenv.com is CLI friendly, devenv.exe... not so much. 533 # devenv.com is CLI friendly, devenv.exe... not so much.
509 return ('"%sdevenv.com" Imprudence.sln /build %s' % 534 return ('"%sdevenv.com" %s.sln /build %s' %
510 (self.find_visual_studio(), self.build_type)) 535 (self.find_visual_studio(), self.project_name, self.build_type))
511 536
512 # this override of run exists because the PlatformSetup version 537 # this override of run exists because the PlatformSetup version
513 # uses Unix/Mac only calls. Freakin' os module! 538 # uses Unix/Mac only calls. Freakin' os module!
@@ -524,17 +549,26 @@ class WindowsSetup(PlatformSetup):
524 '''Override to add the vstool.exe call after running cmake.''' 549 '''Override to add the vstool.exe call after running cmake.'''
525 PlatformSetup.run_cmake(self, args) 550 PlatformSetup.run_cmake(self, args)
526 if self.unattended == 'FALSE': 551 if self.unattended == 'FALSE':
527 for build_dir in self.build_dirs(): 552 self.run_vstool()
528 vstool_cmd = os.path.join('tools','vstool','VSTool.exe') \ 553
529 + ' --solution ' \ 554 def run_vstool(self):
530 + os.path.join(build_dir,'Imprudence.sln') \ 555 for build_dir in self.build_dirs():
531 + ' --config RelWithDebInfo' \ 556 stamp = os.path.join(build_dir, 'vstool.txt')
532 + ' --startup imprudence-bin' 557 try:
533 print 'Running %r in %r' % (vstool_cmd, os.getcwd()) 558 prev_build = open(stamp).read().strip()
534 self.run(vstool_cmd) 559 except IOError:
560 prev_build = ''
561 vstool_cmd = (os.path.join('tools','vstool','VSTool.exe') +
562 ' --solution ' +
563 os.path.join(build_dir,'Imprudence.sln') +
564 ' --config ' + self.build_type +
565 ' --startup imprudence-bin')
566 print 'Running %r in %r' % (vstool_cmd, getcwd())
567 self.run(vstool_cmd)
568 print >> open(stamp, 'w'), self.build_type
535 569
536 def run_build(self, opts, targets): 570 def run_build(self, opts, targets):
537 cwd = os.getcwd() 571 cwd = getcwd()
538 build_cmd = self.get_build_cmd() 572 build_cmd = self.get_build_cmd()
539 573
540 for d in self.build_dirs(): 574 for d in self.build_dirs():
@@ -565,12 +599,14 @@ class CygwinSetup(WindowsSetup):
565 opts=quote(opts), 599 opts=quote(opts),
566 standalone=self.standalone, 600 standalone=self.standalone,
567 unattended=self.unattended, 601 unattended=self.unattended,
602 project_name=self.project_name
568 ) 603 )
569 #if simple: 604 #if simple:
570 # return 'cmake %(opts)s "%(dir)s"' % args 605 # return 'cmake %(opts)s "%(dir)s"' % args
571 return ('cmake -G "%(generator)s" ' 606 return ('cmake -G "%(generator)s" '
572 '-DUNATTENDED:BOOl=%(unattended)s ' 607 '-DUNATTENDED:BOOl=%(unattended)s '
573 '-DSTANDALONE:BOOL=%(standalone)s ' 608 '-DSTANDALONE:BOOL=%(standalone)s '
609 '-DROOT_PROJECT_NAME:STRING=%(project_name)s '
574 '%(opts)s "%(dir)s"' % args) 610 '%(opts)s "%(dir)s"' % args)
575 611
576setup_platform = { 612setup_platform = {
@@ -582,7 +618,7 @@ setup_platform = {
582 618
583 619
584usage_msg = ''' 620usage_msg = '''
585Usage: develop.py [options] command [command-options] 621Usage: develop.py [options] [command [command-options]]
586 622
587Options: 623Options:
588 -h | --help print this help message 624 -h | --help print this help message
@@ -595,12 +631,26 @@ Options:
595 Windows: VC71 or VS2003 (default), VC80 (VS2005) or VC90 (VS2008) 631 Windows: VC71 or VS2003 (default), VC80 (VS2005) or VC90 (VS2008)
596 Mac OS X: Xcode (default), Unix Makefiles 632 Mac OS X: Xcode (default), Unix Makefiles
597 Linux: Unix Makefiles (default), KDevelop3 633 Linux: Unix Makefiles (default), KDevelop3
634 -p | --project=NAME set the root project name. (Doesn't effect makefiles)
635
598Commands: 636Commands:
599 build configure and build default target 637 build configure and build default target
600 clean delete all build directories (does not affect sources) 638 clean delete all build directories (does not affect sources)
601 configure configure project by running cmake 639 configure configure project by running cmake
602 640
603If you do not specify a command, the default is "configure". 641Command-options for "configure":
642 We use cmake variables to change the build configuration.
643 -DSERVER:BOOL=OFF Don't configure simulator/dataserver/etc
644 -DVIEWER:BOOL=OFF Don't configure the viewer
645 -DPACKAGE:BOOL=ON Create "package" target to make installers
646 -DLOCALIZESETUP:BOOL=ON Create one win_setup target per supported language
647
648Examples:
649 Set up a viewer-only project for your system:
650 develop.py configure -DSERVER:BOOL=OFF
651
652 Set up a Visual Studio 2005 project with "package" target:
653 develop.py -G vc80 configure -DPACKAGE:BOOL=ON
604''' 654'''
605 655
606def main(arguments): 656def main(arguments):
@@ -608,10 +658,14 @@ def main(arguments):
608 try: 658 try:
609 opts, args = getopt.getopt( 659 opts, args = getopt.getopt(
610 arguments, 660 arguments,
611 '?hNt:G:', 661 '?hNt:p:G:',
612 ['help', 'standalone', 'no-distcc', 'unattended', 'type=', 'incredibuild', 'generator=']) 662 ['help', 'standalone', 'no-distcc', 'unattended', 'type=', 'incredibuild', 'generator=', 'project='])
613 except getopt.GetoptError, err: 663 except getopt.GetoptError, err:
614 print >> sys.stderr, 'Error:', err 664 print >> sys.stderr, 'Error:', err
665 print >> sys.stderr, """
666Note: You must pass -D options to cmake after the "configure" command
667For example: develop.py configure -DSERVER:BOOL=OFF"""
668 print >> sys.stderr, usage_msg.strip()
615 sys.exit(1) 669 sys.exit(1)
616 670
617 for o, a in opts: 671 for o, a in opts:
@@ -637,6 +691,8 @@ def main(arguments):
637 setup.generator = a 691 setup.generator = a
638 elif o in ('-N', '--no-distcc'): 692 elif o in ('-N', '--no-distcc'):
639 setup.distcc = False 693 setup.distcc = False
694 elif o in ('-p', '--project'):
695 setup.project_name = a
640 elif o in ('--incredibuild'): 696 elif o in ('--incredibuild'):
641 setup.incredibuild = True 697 setup.incredibuild = True
642 else: 698 else:
@@ -664,13 +720,14 @@ def main(arguments):
664 print >> sys.stderr, 'Error: unknown subcommand', repr(cmd) 720 print >> sys.stderr, 'Error: unknown subcommand', repr(cmd)
665 print >> sys.stderr, "(run 'develop.py --help' for help)" 721 print >> sys.stderr, "(run 'develop.py --help' for help)"
666 sys.exit(1) 722 sys.exit(1)
667 except CommandError, err:
668 print >> sys.stderr, 'Error:', err
669 sys.exit(1)
670 except getopt.GetoptError, err: 723 except getopt.GetoptError, err:
671 print >> sys.stderr, 'Error with %r subcommand: %s' % (cmd, err) 724 print >> sys.stderr, 'Error with %r subcommand: %s' % (cmd, err)
672 sys.exit(1) 725 sys.exit(1)
673 726
674 727
675if __name__ == '__main__': 728if __name__ == '__main__':
676 main(sys.argv[1:]) 729 try:
730 main(sys.argv[1:])
731 except CommandError, err:
732 print >> sys.stderr, 'Error:', err
733 sys.exit(1)
diff --git a/linden/indra/llaudio/CMakeLists.txt b/linden/indra/llaudio/CMakeLists.txt
index b662023..aa15a9d 100644
--- a/linden/indra/llaudio/CMakeLists.txt
+++ b/linden/indra/llaudio/CMakeLists.txt
@@ -9,6 +9,7 @@ include(LLCommon)
9include(LLMath) 9include(LLMath)
10include(LLMessage) 10include(LLMessage)
11include(LLVFS) 11include(LLVFS)
12include(LLMedia)
12 13
13include_directories( 14include_directories(
14 ${FMOD_INCLUDE_DIR} 15 ${FMOD_INCLUDE_DIR}
@@ -20,6 +21,10 @@ include_directories(
20 ${VORBISENC_INCLUDE_DIRS} 21 ${VORBISENC_INCLUDE_DIRS}
21 ${VORBISFILE_INCLUDE_DIRS} 22 ${VORBISFILE_INCLUDE_DIRS}
22 ${VORBIS_INCLUDE_DIRS} 23 ${VORBIS_INCLUDE_DIRS}
24 ${OPENAL_LIB_INCLUDE_DIRS}
25 ${FREEAULT_LIB_INCLUDE_DIRS}
26 ${LLMEDIA_INCLUDE_DIRS}
27 ${GSTREAMER_INCLUDE_DIRS}
23 ) 28 )
24 29
25set(llaudio_SOURCE_FILES 30set(llaudio_SOURCE_FILES
@@ -38,6 +43,7 @@ set(llaudio_HEADER_FILES
38 llaudiodecodemgr.h 43 llaudiodecodemgr.h
39 vorbisdecode.h 44 vorbisdecode.h
40 vorbisencode.h 45 vorbisencode.h
46 windgen.h
41 ) 47 )
42 48
43if (FMOD) 49if (FMOD)
@@ -59,6 +65,19 @@ if (FMOD)
59 endif (LINUX) 65 endif (LINUX)
60endif (FMOD) 66endif (FMOD)
61 67
68if (OPENAL)
69 list(APPEND llaudio_SOURCE_FILES
70 audioengine_openal.cpp
71 listener_openal.cpp
72 )
73
74 list(APPEND llaudio_HEADER_FILES
75 audioengine_openal.h
76 listener_openal.h
77 )
78
79endif (OPENAL)
80
62set_source_files_properties(${llaudio_HEADER_FILES} 81set_source_files_properties(${llaudio_HEADER_FILES}
63 PROPERTIES HEADER_FILE_ONLY TRUE) 82 PROPERTIES HEADER_FILE_ONLY TRUE)
64 83
diff --git a/linden/indra/llaudio/audioengine.cpp b/linden/indra/llaudio/audioengine.cpp
index 5dd5b28..da9bcba 100644
--- a/linden/indra/llaudio/audioengine.cpp
+++ b/linden/indra/llaudio/audioengine.cpp
@@ -44,14 +44,13 @@
44#include "llaudiodecodemgr.h" 44#include "llaudiodecodemgr.h"
45#include "llassetstorage.h" 45#include "llassetstorage.h"
46 46
47#include "llmediamanager.h"
48
47// necessary for grabbing sounds from sim (implemented in viewer) 49// necessary for grabbing sounds from sim (implemented in viewer)
48extern void request_sound(const LLUUID &sound_guid); 50extern void request_sound(const LLUUID &sound_guid);
49 51
50LLAudioEngine* gAudiop = NULL; 52LLAudioEngine* gAudiop = NULL;
51 53
52// Maximum amount of time we wait for a transfer to complete before starting
53// off another one.
54const F32 MAX_CURRENT_TRANSFER_TIME = 60.f;
55 54
56// 55//
57// LLAudioEngine implementation 56// LLAudioEngine implementation
@@ -75,13 +74,13 @@ void LLAudioEngine::setDefaults()
75 74
76 mListenerp = NULL; 75 mListenerp = NULL;
77 76
78 mMuted = FALSE; 77 mMuted = false;
79 mUserData = NULL; 78 mUserData = NULL;
80 79
81 mLastStatus = 0; 80 mLastStatus = 0;
82 81
83 mNumChannels = 0; 82 mNumChannels = 0;
84 mEnableWind = FALSE; 83 mEnableWind = false;
85 84
86 S32 i; 85 S32 i;
87 for (i = 0; i < MAX_CHANNELS; i++) 86 for (i = 0; i < MAX_CHANNELS; i++)
@@ -91,15 +90,21 @@ void LLAudioEngine::setDefaults()
91 for (i = 0; i < MAX_BUFFERS; i++) 90 for (i = 0; i < MAX_BUFFERS; i++)
92 { 91 {
93 mBuffers[i] = NULL; 92 mBuffers[i] = NULL;
94 } 93 }
95 94
96 mMasterGain = 1.f; 95 mMasterGain = 1.f;
97 mInternetStreamGain = 0.125f; 96 mInternetStreamGain = 0.125f;
98 mNextWindUpdate = 0.f; 97 mNextWindUpdate = 0.f;
98
99 mInternetStreamMedia = NULL;
100 mInternetStreamURL.clear();
101
102 for (U32 i = 0; i < LLAudioEngine::AUDIO_TYPE_COUNT; i++)
103 mSecondaryGain[i] = 1.0f;
99} 104}
100 105
101 106
102BOOL LLAudioEngine::init(const S32 num_channels, void* userdata) 107bool LLAudioEngine::init(const S32 num_channels, void* userdata)
103{ 108{
104 setDefaults(); 109 setDefaults();
105 110
@@ -111,7 +116,9 @@ BOOL LLAudioEngine::init(const S32 num_channels, void* userdata)
111 // Initialize the decode manager 116 // Initialize the decode manager
112 gAudioDecodeMgrp = new LLAudioDecodeMgr; 117 gAudioDecodeMgrp = new LLAudioDecodeMgr;
113 118
114 return TRUE; 119 LL_INFOS("AudioEngine") << "LLAudioEngine::init() AudioEngine successfully initialized" << llendl;
120
121 return true;
115} 122}
116 123
117 124
@@ -121,6 +128,9 @@ void LLAudioEngine::shutdown()
121 delete gAudioDecodeMgrp; 128 delete gAudioDecodeMgrp;
122 gAudioDecodeMgrp = NULL; 129 gAudioDecodeMgrp = NULL;
123 130
131 // Clean up wind source
132 cleanupWind();
133
124 // Clean up audio sources 134 // Clean up audio sources
125 source_map::iterator iter_src; 135 source_map::iterator iter_src;
126 for (iter_src = mAllSources.begin(); iter_src != mAllSources.end(); iter_src++) 136 for (iter_src = mAllSources.begin(); iter_src != mAllSources.end(); iter_src++)
@@ -141,22 +151,146 @@ void LLAudioEngine::shutdown()
141 S32 i; 151 S32 i;
142 for (i = 0; i < MAX_CHANNELS; i++) 152 for (i = 0; i < MAX_CHANNELS; i++)
143 { 153 {
144 if (mChannels[i]) 154 delete mChannels[i];
145 { 155 mChannels[i] = NULL;
146 delete mChannels[i];
147 mChannels[i] = NULL;
148 }
149 } 156 }
150 157
151 // Clean up buffers 158 // Clean up buffers
152 for (i = 0; i < MAX_BUFFERS; i++) 159 for (i = 0; i < MAX_BUFFERS; i++)
153 { 160 {
154 if (mBuffers[i]) 161 delete mBuffers[i];
162 mBuffers[i] = NULL;
163 }
164
165 delete mInternetStreamMedia;
166 mInternetStreamMedia = NULL;
167 mInternetStreamURL.clear();
168}
169
170
171// virtual
172void LLAudioEngine::startInternetStream(const std::string& url)
173{
174 LL_INFOS("AudioEngine") << "entered startInternetStream()" << llendl;
175
176 if (!mInternetStreamMedia)
177 {
178 LLMediaManager* mgr = LLMediaManager::getInstance();
179 if (mgr)
155 { 180 {
156 delete mBuffers[i]; 181 mInternetStreamMedia = mgr->createSourceFromMimeType(LLURI(url).scheme(), "audio/mpeg"); // assumes that whatever media implementation supports mp3 also supports vorbis.
157 mBuffers[i] = NULL; 182 LL_INFOS("AudioEngine") << "mInternetStreamMedia is now " << mInternetStreamMedia << llendl;
183 }
184 }
185
186 if(!mInternetStreamMedia)
187 return;
188
189 if (!url.empty()) {
190 LL_INFOS("AudioEngine") << "Starting internet stream: " << url << llendl;
191 mInternetStreamURL = url;
192 mInternetStreamMedia->navigateTo ( url );
193 LL_INFOS("AudioEngine") << "Playing....." << llendl;
194 mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_START);
195 mInternetStreamMedia->updateMedia();
196 } else {
197 LL_INFOS("AudioEngine") << "setting stream to NULL"<< llendl;
198 mInternetStreamURL.clear();
199 mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_STOP);
200 mInternetStreamMedia->updateMedia();
201 }
202 //#endif
203}
204
205// virtual
206void LLAudioEngine::stopInternetStream()
207{
208 LL_INFOS("AudioEngine") << "entered stopInternetStream()" << llendl;
209
210 if(mInternetStreamMedia)
211 {
212 if( ! mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_STOP)){
213 LL_INFOS("AudioEngine") << "attempting to stop stream failed!" << llendl;
214 }
215 mInternetStreamMedia->updateMedia();
216 }
217
218 mInternetStreamURL.clear();
219}
220
221// virtual
222void LLAudioEngine::pauseInternetStream(int pause)
223{
224 LL_INFOS("AudioEngine") << "entered pauseInternetStream()" << llendl;
225
226 if(!mInternetStreamMedia)
227 return;
228
229 if(pause)
230 {
231 if(! mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_PAUSE))
232 {
233 LL_INFOS("AudioEngine") << "attempting to pause stream failed!" << llendl;
234 }
235 } else {
236 if(! mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_START))
237 {
238 LL_INFOS("AudioEngine") << "attempting to unpause stream failed!" << llendl;
158 } 239 }
159 } 240 }
241 mInternetStreamMedia->updateMedia();
242}
243
244// virtual
245void LLAudioEngine::updateInternetStream()
246{
247 if (mInternetStreamMedia)
248 mInternetStreamMedia->updateMedia();
249}
250
251// virtual
252int LLAudioEngine::isInternetStreamPlaying()
253{
254 if (!mInternetStreamMedia)
255 return 0;
256
257 if (mInternetStreamMedia->getStatus() == LLMediaBase::STATUS_STARTED)
258 {
259 return 1; // Active and playing
260 }
261
262 if (mInternetStreamMedia->getStatus() == LLMediaBase::STATUS_PAUSED)
263 {
264 return 2; // paused
265 }
266
267 return 0; // Stopped
268}
269
270// virtual
271void LLAudioEngine::getInternetStreamInfo(char* artist, char* title)
272{
273 artist[0] = 0;
274 title[0] = 0;
275}
276
277// virtual
278void LLAudioEngine::setInternetStreamGain(F32 vol)
279{
280 mInternetStreamGain = vol;
281
282 if(!mInternetStreamMedia)
283 return;
284
285 vol = llclamp(vol, 0.f, 1.f);
286 mInternetStreamMedia->setVolume(vol);
287 mInternetStreamMedia->updateMedia();
288}
289
290// virtual
291const std::string& LLAudioEngine::getInternetStreamURL()
292{
293 return mInternetStreamURL;
160} 294}
161 295
162 296
@@ -167,6 +301,13 @@ void LLAudioEngine::updateChannels()
167 { 301 {
168 if (mChannels[i]) 302 if (mChannels[i])
169 { 303 {
304 // set secondary gain if type is available
305 LLAudioSource* source = mChannels[i]->getSource();
306 if (source)
307 {
308 mChannels[i]->setSecondaryGain(mSecondaryGain[source->getType()]);
309 }
310
170 mChannels[i]->updateBuffer(); 311 mChannels[i]->updateBuffer();
171 mChannels[i]->update3DPosition(); 312 mChannels[i]->update3DPosition();
172 mChannels[i]->updateLoop(); 313 mChannels[i]->updateLoop();
@@ -200,7 +341,7 @@ void LLAudioEngine::idle(F32 max_decode_time)
200 { 341 {
201 if (mBuffers[i]) 342 if (mBuffers[i])
202 { 343 {
203 mBuffers[i]->mInUse = FALSE; 344 mBuffers[i]->mInUse = false;
204 } 345 }
205 } 346 }
206 347
@@ -245,18 +386,18 @@ void LLAudioEngine::idle(F32 max_decode_time)
245 LLAudioChannel *channelp = getFreeChannel(max_priority); 386 LLAudioChannel *channelp = getFreeChannel(max_priority);
246 if (channelp) 387 if (channelp)
247 { 388 {
248 //llinfos << "Replacing source in channel due to priority!" << llendl; 389 //LL_INFOS("AudioEngine") << "Replacing source in channel due to priority!" << llendl;
249 max_sourcep->setChannel(channelp); 390 max_sourcep->setChannel(channelp);
250 channelp->setSource(max_sourcep); 391 channelp->setSource(max_sourcep);
251 if (max_sourcep->isSyncSlave()) 392 if (max_sourcep->isSyncSlave())
252 { 393 {
253 // A sync slave, it doesn't start playing until it's synced up with the master. 394 // A sync slave, it doesn't start playing until it's synced up with the master.
254 // Flag this channel as waiting for sync, and return true. 395 // Flag this channel as waiting for sync, and return true.
255 channelp->setWaiting(TRUE); 396 channelp->setWaiting(true);
256 } 397 }
257 else 398 else
258 { 399 {
259 channelp->setWaiting(FALSE); 400 channelp->setWaiting(false);
260 channelp->play(); 401 channelp->play();
261 } 402 }
262 } 403 }
@@ -396,7 +537,7 @@ void LLAudioEngine::idle(F32 max_decode_time)
396 if (sync_masterp->getChannel()) 537 if (sync_masterp->getChannel())
397 { 538 {
398 channelp->playSynced(master_channelp); 539 channelp->playSynced(master_channelp);
399 channelp->setWaiting(FALSE); 540 channelp->setWaiting(false);
400 } 541 }
401 } 542 }
402 } 543 }
@@ -412,7 +553,7 @@ void LLAudioEngine::idle(F32 max_decode_time)
412 { 553 {
413 if (!mBuffers[i]->mInUse && mBuffers[i]->mLastUseTimer.getElapsedTimeF32() > 30.f) 554 if (!mBuffers[i]->mInUse && mBuffers[i]->mLastUseTimer.getElapsedTimeF32() > 30.f)
414 { 555 {
415 //llinfos << "Flushing unused buffer!" << llendl; 556 //LL_INFOS("AudioEngine") << "Flushing unused buffer!" << llendl;
416 mBuffers[i]->mAudioDatap->mBufferp = NULL; 557 mBuffers[i]->mAudioDatap->mBufferp = NULL;
417 delete mBuffers[i]; 558 delete mBuffers[i];
418 mBuffers[i] = NULL; 559 mBuffers[i] = NULL;
@@ -426,7 +567,7 @@ void LLAudioEngine::idle(F32 max_decode_time)
426 { 567 {
427 if (mChannels[i]) 568 if (mChannels[i])
428 { 569 {
429 mChannels[i]->mLoopedThisFrame = FALSE; 570 mChannels[i]->mLoopedThisFrame = false;
430 } 571 }
431 } 572 }
432 573
@@ -437,13 +578,17 @@ void LLAudioEngine::idle(F32 max_decode_time)
437 // missed picking it up in all the places that can add 578 // missed picking it up in all the places that can add
438 // or request new data. 579 // or request new data.
439 startNextTransfer(); 580 startNextTransfer();
581
582 updateInternetStream();
440} 583}
441 584
442BOOL LLAudioEngine::updateBufferForData(LLAudioData *adp, const LLUUID &audio_uuid) 585
586
587bool LLAudioEngine::updateBufferForData(LLAudioData *adp, const LLUUID &audio_uuid)
443{ 588{
444 if (!adp) 589 if (!adp)
445 { 590 {
446 return FALSE; 591 return false;
447 } 592 }
448 593
449 // Update the audio buffer first - load a sound if we have it. 594 // Update the audio buffer first - load a sound if we have it.
@@ -466,14 +611,14 @@ BOOL LLAudioEngine::updateBufferForData(LLAudioData *adp, const LLUUID &audio_uu
466 } 611 }
467 else 612 else
468 { 613 {
469 return FALSE; 614 return false;
470 } 615 }
471 } 616 }
472 return TRUE; 617 return true;
473} 618}
474 619
475 620
476void LLAudioEngine::enableWind(BOOL enable) 621void LLAudioEngine::enableWind(bool enable)
477{ 622{
478 if (enable && (!mEnableWind)) 623 if (enable && (!mEnableWind))
479 { 624 {
@@ -521,8 +666,8 @@ LLAudioBuffer *LLAudioEngine::getFreeBuffer()
521 666
522 if (buffer_id >= 0) 667 if (buffer_id >= 0)
523 { 668 {
524 llinfos << "Taking over unused buffer " << buffer_id << llendl; 669 LL_INFOS("AudioEngine") << "Taking over unused buffer " << buffer_id << llendl;
525 //llinfos << "Flushing unused buffer!" << llendl; 670 //LL_INFOS("AudioEngine") << "Flushing unused buffer!" << llendl;
526 mBuffers[buffer_id]->mAudioDatap->mBufferp = NULL; 671 mBuffers[buffer_id]->mAudioDatap->mBufferp = NULL;
527 delete mBuffers[buffer_id]; 672 delete mBuffers[buffer_id];
528 mBuffers[buffer_id] = createBuffer(); 673 mBuffers[buffer_id] = createBuffer();
@@ -601,7 +746,7 @@ void LLAudioEngine::cleanupBuffer(LLAudioBuffer *bufferp)
601} 746}
602 747
603 748
604BOOL LLAudioEngine::preloadSound(const LLUUID &uuid) 749bool LLAudioEngine::preloadSound(const LLUUID &uuid)
605{ 750{
606 gAudiop->getAudioData(uuid); // We don't care about the return value, this is just to make sure 751 gAudiop->getAudioData(uuid); // We don't care about the return value, this is just to make sure
607 // that we have an entry, which will mean that the audio engine knows about this 752 // that we have an entry, which will mean that the audio engine knows about this
@@ -609,23 +754,23 @@ BOOL LLAudioEngine::preloadSound(const LLUUID &uuid)
609 if (gAudioDecodeMgrp->addDecodeRequest(uuid)) 754 if (gAudioDecodeMgrp->addDecodeRequest(uuid))
610 { 755 {
611 // This means that we do have a local copy, and we're working on decoding it. 756 // This means that we do have a local copy, and we're working on decoding it.
612 return TRUE; 757 return true;
613 } 758 }
614 759
615 // At some point we need to have the audio/asset system check the static VFS 760 // At some point we need to have the audio/asset system check the static VFS
616 // before it goes off and fetches stuff from the server. 761 // before it goes off and fetches stuff from the server.
617 //llwarns << "Used internal preload for non-local sound" << llendl; 762 //llwarns << "Used internal preload for non-local sound" << llendl;
618 return FALSE; 763 return false;
619} 764}
620 765
621 766
622BOOL LLAudioEngine::isWindEnabled() 767bool LLAudioEngine::isWindEnabled()
623{ 768{
624 return mEnableWind; 769 return mEnableWind;
625} 770}
626 771
627 772
628void LLAudioEngine::setMuted(BOOL muted) 773void LLAudioEngine::setMuted(bool muted)
629{ 774{
630 mMuted = muted; 775 mMuted = muted;
631 enableWind(!mMuted); 776 enableWind(!mMuted);
@@ -643,6 +788,18 @@ F32 LLAudioEngine::getMasterGain()
643 return mMasterGain; 788 return mMasterGain;
644} 789}
645 790
791void LLAudioEngine::setSecondaryGain(S32 type, F32 gain)
792{
793 llassert(type < LLAudioEngine::AUDIO_TYPE_COUNT);
794
795 mSecondaryGain[type] = gain;
796}
797
798F32 LLAudioEngine::getSecondaryGain(S32 type)
799{
800 return mSecondaryGain[type];
801}
802
646F32 LLAudioEngine::getInternetStreamGain() 803F32 LLAudioEngine::getInternetStreamGain()
647{ 804{
648 return mInternetStreamGain; 805 return mInternetStreamGain;
@@ -718,10 +875,11 @@ F64 LLAudioEngine::mapWindVecToPan(LLVector3 wind_vec)
718} 875}
719 876
720 877
721void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_id, const F32 gain, const LLVector3d &pos_global) 878void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_id, const F32 gain,
879 const S32 type, const LLVector3d &pos_global)
722{ 880{
723 // Create a new source (since this can't be associated with an existing source. 881 // Create a new source (since this can't be associated with an existing source.
724 //llinfos << "Localized: " << audio_uuid << llendl; 882 //LL_INFOS("AudioEngine") << "Localized: " << audio_uuid << llendl;
725 883
726 if (mMuted) 884 if (mMuted)
727 { 885 {
@@ -731,11 +889,11 @@ void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_i
731 LLUUID source_id; 889 LLUUID source_id;
732 source_id.generate(); 890 source_id.generate();
733 891
734 LLAudioSource *asp = new LLAudioSource(source_id, owner_id, gain); 892 LLAudioSource *asp = new LLAudioSource(source_id, owner_id, gain, type);
735 gAudiop->addAudioSource(asp); 893 gAudiop->addAudioSource(asp);
736 if (pos_global.isExactlyZero()) 894 if (pos_global.isExactlyZero())
737 { 895 {
738 asp->setAmbient(TRUE); 896 asp->setAmbient(true);
739 } 897 }
740 else 898 else
741 { 899 {
@@ -914,7 +1072,7 @@ void LLAudioEngine::cleanupAudioSource(LLAudioSource *asp)
914} 1072}
915 1073
916 1074
917BOOL LLAudioEngine::hasDecodedFile(const LLUUID &uuid) 1075bool LLAudioEngine::hasDecodedFile(const LLUUID &uuid)
918{ 1076{
919 std::string uuid_str; 1077 std::string uuid_str;
920 uuid.toString(uuid_str); 1078 uuid.toString(uuid_str);
@@ -925,16 +1083,16 @@ BOOL LLAudioEngine::hasDecodedFile(const LLUUID &uuid)
925 1083
926 if (gDirUtilp->fileExists(wav_path)) 1084 if (gDirUtilp->fileExists(wav_path))
927 { 1085 {
928 return TRUE; 1086 return true;
929 } 1087 }
930 else 1088 else
931 { 1089 {
932 return FALSE; 1090 return false;
933 } 1091 }
934} 1092}
935 1093
936 1094
937BOOL LLAudioEngine::hasLocalFile(const LLUUID &uuid) 1095bool LLAudioEngine::hasLocalFile(const LLUUID &uuid)
938{ 1096{
939 // See if it's in the VFS. 1097 // See if it's in the VFS.
940 return gVFS->getExists(uuid, LLAssetType::AT_SOUND); 1098 return gVFS->getExists(uuid, LLAssetType::AT_SOUND);
@@ -943,10 +1101,10 @@ BOOL LLAudioEngine::hasLocalFile(const LLUUID &uuid)
943 1101
944void LLAudioEngine::startNextTransfer() 1102void LLAudioEngine::startNextTransfer()
945{ 1103{
946 //llinfos << "LLAudioEngine::startNextTransfer()" << llendl; 1104 //LL_INFOS("AudioEngine") << "LLAudioEngine::startNextTransfer()" << llendl;
947 if (mCurrentTransfer.notNull() || getMuted()) 1105 if (mCurrentTransfer.notNull() || getMuted())
948 { 1106 {
949 //llinfos << "Transfer in progress, aborting" << llendl; 1107 //LL_INFOS("AudioEngine") << "Transfer in progress, aborting" << llendl;
950 return; 1108 return;
951 } 1109 }
952 1110
@@ -1127,7 +1285,7 @@ void LLAudioEngine::startNextTransfer()
1127 1285
1128 if (asset_id.notNull()) 1286 if (asset_id.notNull())
1129 { 1287 {
1130 llinfos << "Getting asset data for: " << asset_id << llendl; 1288 LL_INFOS("AudioEngine") << "Getting asset data for: " << asset_id << llendl;
1131 gAudiop->mCurrentTransfer = asset_id; 1289 gAudiop->mCurrentTransfer = asset_id;
1132 gAudiop->mCurrentTransferTimer.reset(); 1290 gAudiop->mCurrentTransferTimer.reset();
1133 gAssetStorage->getAssetData(asset_id, LLAssetType::AT_SOUND, 1291 gAssetStorage->getAssetData(asset_id, LLAssetType::AT_SOUND,
@@ -1135,7 +1293,7 @@ void LLAudioEngine::startNextTransfer()
1135 } 1293 }
1136 else 1294 else
1137 { 1295 {
1138 //llinfos << "No pending transfers?" << llendl; 1296 //LL_INFOS("AudioEngine") << "No pending transfers?" << llendl;
1139 } 1297 }
1140} 1298}
1141 1299
@@ -1145,14 +1303,14 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E
1145{ 1303{
1146 if (result_code) 1304 if (result_code)
1147 { 1305 {
1148 llinfos << "Boom, error in audio file transfer: " << LLAssetStorage::getErrorString( result_code ) << " (" << result_code << ")" << llendl; 1306 LL_INFOS("AudioEngine") << "Boom, error in audio file transfer: " << LLAssetStorage::getErrorString( result_code ) << " (" << result_code << ")" << llendl;
1149 // Need to mark data as bad to avoid constant rerequests. 1307 // Need to mark data as bad to avoid constant rerequests.
1150 LLAudioData *adp = gAudiop->getAudioData(uuid); 1308 LLAudioData *adp = gAudiop->getAudioData(uuid);
1151 if (adp) 1309 if (adp)
1152 { 1310 {
1153 adp->setHasValidData(FALSE); 1311 adp->setHasValidData(false);
1154 adp->setHasLocalData(FALSE); 1312 adp->setHasLocalData(false);
1155 adp->setHasDecodedData(FALSE); 1313 adp->setHasDecodedData(false);
1156 } 1314 }
1157 } 1315 }
1158 else 1316 else
@@ -1165,8 +1323,8 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E
1165 } 1323 }
1166 else 1324 else
1167 { 1325 {
1168 adp->setHasValidData(TRUE); 1326 adp->setHasValidData(true);
1169 adp->setHasLocalData(TRUE); 1327 adp->setHasLocalData(true);
1170 gAudioDecodeMgrp->addDecodeRequest(uuid); 1328 gAudioDecodeMgrp->addDecodeRequest(uuid);
1171 } 1329 }
1172 } 1330 }
@@ -1180,17 +1338,18 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E
1180// 1338//
1181 1339
1182 1340
1183LLAudioSource::LLAudioSource(const LLUUID& id, const LLUUID& owner_id, const F32 gain) 1341LLAudioSource::LLAudioSource(const LLUUID& id, const LLUUID& owner_id, const F32 gain, const S32 type)
1184: mID(id), 1342: mID(id),
1185 mOwnerID(owner_id), 1343 mOwnerID(owner_id),
1186 mPriority(0.f), 1344 mPriority(0.f),
1187 mGain(gain), 1345 mGain(gain),
1188 mAmbient(FALSE), 1346 mType(type),
1189 mLoop(FALSE), 1347 mAmbient(false),
1190 mSyncMaster(FALSE), 1348 mLoop(false),
1191 mSyncSlave(FALSE), 1349 mSyncMaster(false),
1192 mQueueSounds(FALSE), 1350 mSyncSlave(false),
1193 mPlayedOnce(FALSE), 1351 mQueueSounds(false),
1352 mPlayedOnce(false),
1194 mChannelp(NULL), 1353 mChannelp(NULL),
1195 mCurrentDatap(NULL), 1354 mCurrentDatap(NULL),
1196 mQueuedDatap(NULL) 1355 mQueuedDatap(NULL)
@@ -1254,7 +1413,7 @@ void LLAudioSource::updatePriority()
1254 } 1413 }
1255} 1414}
1256 1415
1257BOOL LLAudioSource::setupChannel() 1416bool LLAudioSource::setupChannel()
1258{ 1417{
1259 LLAudioData *adp = getCurrentData(); 1418 LLAudioData *adp = getCurrentData();
1260 1419
@@ -1262,7 +1421,7 @@ BOOL LLAudioSource::setupChannel()
1262 { 1421 {
1263 // We're not ready to play back the sound yet, so don't try and allocate a channel for it. 1422 // We're not ready to play back the sound yet, so don't try and allocate a channel for it.
1264 //llwarns << "Aborting, no buffer" << llendl; 1423 //llwarns << "Aborting, no buffer" << llendl;
1265 return FALSE; 1424 return false;
1266 } 1425 }
1267 1426
1268 1427
@@ -1280,15 +1439,15 @@ BOOL LLAudioSource::setupChannel()
1280 // Now we have to reprioritize. 1439 // Now we have to reprioritize.
1281 // For now, just don't play the sound. 1440 // For now, just don't play the sound.
1282 //llwarns << "Aborting, no free channels" << llendl; 1441 //llwarns << "Aborting, no free channels" << llendl;
1283 return FALSE; 1442 return false;
1284 } 1443 }
1285 1444
1286 mChannelp->setSource(this); 1445 mChannelp->setSource(this);
1287 return TRUE; 1446 return true;
1288} 1447}
1289 1448
1290 1449
1291BOOL LLAudioSource::play(const LLUUID &audio_uuid) 1450bool LLAudioSource::play(const LLUUID &audio_uuid)
1292{ 1451{
1293 if (audio_uuid.isNull()) 1452 if (audio_uuid.isNull())
1294 { 1453 {
@@ -1296,7 +1455,7 @@ BOOL LLAudioSource::play(const LLUUID &audio_uuid)
1296 { 1455 {
1297 getChannel()->setSource(NULL); 1456 getChannel()->setSource(NULL);
1298 setChannel(NULL); 1457 setChannel(NULL);
1299 addAudioData(NULL, TRUE); 1458 addAudioData(NULL, true);
1300 } 1459 }
1301 } 1460 }
1302 // Reset our age timeout if someone attempts to play the source. 1461 // Reset our age timeout if someone attempts to play the source.
@@ -1304,7 +1463,7 @@ BOOL LLAudioSource::play(const LLUUID &audio_uuid)
1304 1463
1305 LLAudioData *adp = gAudiop->getAudioData(audio_uuid); 1464 LLAudioData *adp = gAudiop->getAudioData(audio_uuid);
1306 1465
1307 BOOL has_buffer = gAudiop->updateBufferForData(adp, audio_uuid); 1466 bool has_buffer = gAudiop->updateBufferForData(adp, audio_uuid);
1308 1467
1309 1468
1310 addAudioData(adp); 1469 addAudioData(adp);
@@ -1312,47 +1471,48 @@ BOOL LLAudioSource::play(const LLUUID &audio_uuid)
1312 if (!has_buffer) 1471 if (!has_buffer)
1313 { 1472 {
1314 // Don't bother trying to set up a channel or anything, we don't have an audio buffer. 1473 // Don't bother trying to set up a channel or anything, we don't have an audio buffer.
1315 return FALSE; 1474 return false;
1316 } 1475 }
1317 1476
1318 if (!setupChannel()) 1477 if (!setupChannel())
1319 { 1478 {
1320 return FALSE; 1479 return false;
1321 } 1480 }
1322 1481
1323 if (isSyncSlave()) 1482 if (isSyncSlave())
1324 { 1483 {
1325 // A sync slave, it doesn't start playing until it's synced up with the master. 1484 // A sync slave, it doesn't start playing until it's synced up with the master.
1326 // Flag this channel as waiting for sync, and return true. 1485 // Flag this channel as waiting for sync, and return true.
1327 getChannel()->setWaiting(TRUE); 1486 getChannel()->setWaiting(true);
1328 return TRUE; 1487 return true;
1329 } 1488 }
1330 1489
1331 getChannel()->play(); 1490 getChannel()->play();
1332 return TRUE; 1491 return true;
1333} 1492}
1334 1493
1335 1494
1336BOOL LLAudioSource::isDone() 1495bool LLAudioSource::isDone()
1337{ 1496{
1338 const F32 MAX_AGE = 60.f; 1497 const F32 MAX_AGE = 60.f;
1339 const F32 MAX_UNPLAYED_AGE = 15.f; 1498 const F32 MAX_UNPLAYED_AGE = 15.f;
1499
1340 if (isLoop()) 1500 if (isLoop())
1341 { 1501 {
1342 // Looped sources never die on their own. 1502 // Looped sources never die on their own.
1343 return FALSE; 1503 return false;
1344 } 1504 }
1345 1505
1346 1506
1347 if (hasPendingPreloads()) 1507 if (hasPendingPreloads())
1348 { 1508 {
1349 return FALSE; 1509 return false;
1350 } 1510 }
1351 1511
1352 if (mQueuedDatap) 1512 if (mQueuedDatap)
1353 { 1513 {
1354 // Don't kill this sound if we've got something queued up to play. 1514 // Don't kill this sound if we've got something queued up to play.
1355 return FALSE; 1515 return false;
1356 } 1516 }
1357 1517
1358 F32 elapsed = mAgeTimer.getElapsedTimeF32(); 1518 F32 elapsed = mAgeTimer.getElapsedTimeF32();
@@ -1364,12 +1524,12 @@ BOOL LLAudioSource::isDone()
1364 { 1524 {
1365 // We don't have a channel assigned, and it's been 1525 // We don't have a channel assigned, and it's been
1366 // over 5 seconds since we tried to play it. Don't bother. 1526 // over 5 seconds since we tried to play it. Don't bother.
1367 //llinfos << "No channel assigned, source is done" << llendl; 1527 //LL_INFOS("AudioEngine") << "No channel assigned, source is done" << llendl;
1368 return TRUE; 1528 return true;
1369 } 1529 }
1370 else 1530 else
1371 { 1531 {
1372 return FALSE; 1532 return false;
1373 } 1533 }
1374 } 1534 }
1375 1535
@@ -1377,27 +1537,27 @@ BOOL LLAudioSource::isDone()
1377 { 1537 {
1378 if (elapsed > MAX_AGE) 1538 if (elapsed > MAX_AGE)
1379 { 1539 {
1380 // Arbitarily cut off non-looped sounds when they're 20 seconds old. 1540 // Arbitarily cut off non-looped sounds when they're old.
1381 return TRUE; 1541 return true;
1382 } 1542 }
1383 else 1543 else
1384 { 1544 {
1385 // Sound is still playing and we haven't timed out, don't kill it. 1545 // Sound is still playing and we haven't timed out, don't kill it.
1386 return FALSE; 1546 return false;
1387 } 1547 }
1388 } 1548 }
1389 1549
1390 if ((elapsed > MAX_UNPLAYED_AGE) || mPlayedOnce) 1550 if ((elapsed > MAX_UNPLAYED_AGE) || mPlayedOnce)
1391 { 1551 {
1392 // The sound isn't playing back after 5 seconds or we're already done playing it, kill it. 1552 // The sound isn't playing back after 5 seconds or we're already done playing it, kill it.
1393 return TRUE; 1553 return true;
1394 } 1554 }
1395 1555
1396 return FALSE; 1556 return false;
1397} 1557}
1398 1558
1399 1559
1400void LLAudioSource::addAudioData(LLAudioData *adp, const BOOL set_current) 1560void LLAudioSource::addAudioData(LLAudioData *adp, const bool set_current)
1401{ 1561{
1402 // Only handle a single piece of audio data associated with a source right now, 1562 // Only handle a single piece of audio data associated with a source right now,
1403 // until I implement prefetch. 1563 // until I implement prefetch.
@@ -1465,7 +1625,7 @@ void LLAudioSource::addAudioData(LLAudioData *adp, const BOOL set_current)
1465} 1625}
1466 1626
1467 1627
1468BOOL LLAudioSource::hasPendingPreloads() const 1628bool LLAudioSource::hasPendingPreloads() const
1469{ 1629{
1470 // Check to see if we've got any preloads on deck for this source 1630 // Check to see if we've got any preloads on deck for this source
1471 data_map::const_iterator iter; 1631 data_map::const_iterator iter;
@@ -1475,11 +1635,11 @@ BOOL LLAudioSource::hasPendingPreloads() const
1475 if (!adp->hasDecodedData()) 1635 if (!adp->hasDecodedData())
1476 { 1636 {
1477 // This source is still waiting for a preload 1637 // This source is still waiting for a preload
1478 return TRUE; 1638 return true;
1479 } 1639 }
1480 } 1640 }
1481 1641
1482 return FALSE; 1642 return false;
1483} 1643}
1484 1644
1485 1645
@@ -1514,8 +1674,9 @@ LLAudioBuffer *LLAudioSource::getCurrentBuffer()
1514LLAudioChannel::LLAudioChannel() : 1674LLAudioChannel::LLAudioChannel() :
1515 mCurrentSourcep(NULL), 1675 mCurrentSourcep(NULL),
1516 mCurrentBufferp(NULL), 1676 mCurrentBufferp(NULL),
1517 mLoopedThisFrame(FALSE), 1677 mLoopedThisFrame(false),
1518 mWaiting(FALSE) 1678 mWaiting(false),
1679 mSecondaryGain(1.0f)
1519{ 1680{
1520} 1681}
1521 1682
@@ -1523,7 +1684,7 @@ LLAudioChannel::LLAudioChannel() :
1523LLAudioChannel::~LLAudioChannel() 1684LLAudioChannel::~LLAudioChannel()
1524{ 1685{
1525 // Need to disconnect any sources which are using this channel. 1686 // Need to disconnect any sources which are using this channel.
1526 //llinfos << "Cleaning up audio channel" << llendl; 1687 //LL_INFOS("AudioEngine") << "Cleaning up audio channel" << llendl;
1527 if (mCurrentSourcep) 1688 if (mCurrentSourcep)
1528 { 1689 {
1529 mCurrentSourcep->setChannel(NULL); 1690 mCurrentSourcep->setChannel(NULL);
@@ -1534,22 +1695,22 @@ LLAudioChannel::~LLAudioChannel()
1534 1695
1535void LLAudioChannel::setSource(LLAudioSource *sourcep) 1696void LLAudioChannel::setSource(LLAudioSource *sourcep)
1536{ 1697{
1537 //llinfos << this << ": setSource(" << sourcep << ")" << llendl; 1698 //LL_INFOS("AudioEngine") << this << ": setSource(" << sourcep << ")" << llendl;
1538 1699
1539 if (!sourcep) 1700 if (!sourcep)
1540 { 1701 {
1541 // Clearing the source for this channel, don't need to do anything. 1702 // Clearing the source for this channel, don't need to do anything.
1542 //llinfos << "Clearing source for channel" << llendl; 1703 //LL_INFOS("AudioEngine") << "Clearing source for channel" << llendl;
1543 cleanup(); 1704 cleanup();
1544 mCurrentSourcep = NULL; 1705 mCurrentSourcep = NULL;
1545 mWaiting = FALSE; 1706 mWaiting = false;
1546 return; 1707 return;
1547 } 1708 }
1548 1709
1549 if (sourcep == mCurrentSourcep) 1710 if (sourcep == mCurrentSourcep)
1550 { 1711 {
1551 // Don't reallocate the channel, this will make FMOD goofy. 1712 // Don't reallocate the channel, this will make FMOD goofy.
1552 //llinfos << "Calling setSource with same source!" << llendl; 1713 //LL_INFOS("AudioEngine") << "Calling setSource with same source!" << llendl;
1553 } 1714 }
1554 1715
1555 mCurrentSourcep = sourcep; 1716 mCurrentSourcep = sourcep;
@@ -1558,13 +1719,13 @@ void LLAudioChannel::setSource(LLAudioSource *sourcep)
1558} 1719}
1559 1720
1560 1721
1561BOOL LLAudioChannel::updateBuffer() 1722bool LLAudioChannel::updateBuffer()
1562{ 1723{
1563 if (!mCurrentSourcep) 1724 if (!mCurrentSourcep)
1564 { 1725 {
1565 // This channel isn't associated with any source, nothing 1726 // This channel isn't associated with any source, nothing
1566 // to be updated 1727 // to be updated
1567 return FALSE; 1728 return false;
1568 } 1729 }
1569 1730
1570 LLAudioBuffer *bufferp = mCurrentSourcep->getCurrentBuffer(); 1731 LLAudioBuffer *bufferp = mCurrentSourcep->getCurrentBuffer();
@@ -1574,14 +1735,14 @@ BOOL LLAudioChannel::updateBuffer()
1574 { 1735 {
1575 // The source hasn't changed what buffer it's playing 1736 // The source hasn't changed what buffer it's playing
1576 bufferp->mLastUseTimer.reset(); 1737 bufferp->mLastUseTimer.reset();
1577 bufferp->mInUse = TRUE; 1738 bufferp->mInUse = true;
1578 } 1739 }
1579 return FALSE; 1740 return false;
1580 } 1741 }
1581 1742
1582 // 1743 //
1583 // The source changed what buffer it's playing. Whe need to clean up the 1744 // The source changed what buffer it's playing. We need to clean up
1584 // existing fmod channel 1745 // the existing channel
1585 // 1746 //
1586 cleanup(); 1747 cleanup();
1587 1748
@@ -1589,16 +1750,16 @@ BOOL LLAudioChannel::updateBuffer()
1589 if (bufferp) 1750 if (bufferp)
1590 { 1751 {
1591 bufferp->mLastUseTimer.reset(); 1752 bufferp->mLastUseTimer.reset();
1592 bufferp->mInUse = TRUE; 1753 bufferp->mInUse = true;
1593 } 1754 }
1594 1755
1595 if (!mCurrentBufferp) 1756 if (!mCurrentBufferp)
1596 { 1757 {
1597 // There's no new buffer to be played, so we just abort. 1758 // There's no new buffer to be played, so we just abort.
1598 return FALSE; 1759 return false;
1599 } 1760 }
1600 1761
1601 return TRUE; 1762 return true;
1602} 1763}
1603 1764
1604 1765
@@ -1612,9 +1773,9 @@ BOOL LLAudioChannel::updateBuffer()
1612LLAudioData::LLAudioData(const LLUUID &uuid) : 1773LLAudioData::LLAudioData(const LLUUID &uuid) :
1613 mID(uuid), 1774 mID(uuid),
1614 mBufferp(NULL), 1775 mBufferp(NULL),
1615 mHasLocalData(FALSE), 1776 mHasLocalData(false),
1616 mHasDecodedData(FALSE), 1777 mHasDecodedData(false),
1617 mHasValidData(TRUE) 1778 mHasValidData(true)
1618{ 1779{
1619 if (uuid.isNull()) 1780 if (uuid.isNull())
1620 { 1781 {
@@ -1625,32 +1786,32 @@ LLAudioData::LLAudioData(const LLUUID &uuid) :
1625 if (gAudiop && gAudiop->hasDecodedFile(uuid)) 1786 if (gAudiop && gAudiop->hasDecodedFile(uuid))
1626 { 1787 {
1627 // Already have a decoded version, don't need to decode it. 1788 // Already have a decoded version, don't need to decode it.
1628 mHasLocalData = TRUE; 1789 mHasLocalData = true;
1629 mHasDecodedData = TRUE; 1790 mHasDecodedData = true;
1630 } 1791 }
1631 else if (gAssetStorage && gAssetStorage->hasLocalAsset(uuid, LLAssetType::AT_SOUND)) 1792 else if (gAssetStorage && gAssetStorage->hasLocalAsset(uuid, LLAssetType::AT_SOUND))
1632 { 1793 {
1633 mHasLocalData = TRUE; 1794 mHasLocalData = true;
1634 } 1795 }
1635} 1796}
1636 1797
1637 1798
1638BOOL LLAudioData::load() 1799bool LLAudioData::load()
1639{ 1800{
1640 // For now, just assume we're going to use one buffer per audiodata. 1801 // For now, just assume we're going to use one buffer per audiodata.
1641 if (mBufferp) 1802 if (mBufferp)
1642 { 1803 {
1643 // We already have this sound in a buffer, don't do anything. 1804 // We already have this sound in a buffer, don't do anything.
1644 llinfos << "Already have a buffer for this sound, don't bother loading!" << llendl; 1805 LL_INFOS("AudioEngine") << "Already have a buffer for this sound, don't bother loading!" << llendl;
1645 return TRUE; 1806 return true;
1646 } 1807 }
1647 1808
1648 mBufferp = gAudiop->getFreeBuffer(); 1809 mBufferp = gAudiop->getFreeBuffer();
1649 if (!mBufferp) 1810 if (!mBufferp)
1650 { 1811 {
1651 // No free buffers, abort. 1812 // No free buffers, abort.
1652 llinfos << "Not able to allocate a new audio buffer, aborting." << llendl; 1813 LL_INFOS("AudioEngine") << "Not able to allocate a new audio buffer, aborting." << llendl;
1653 return FALSE; 1814 return false;
1654 } 1815 }
1655 1816
1656 std::string uuid_str; 1817 std::string uuid_str;
@@ -1664,10 +1825,10 @@ BOOL LLAudioData::load()
1664 gAudiop->cleanupBuffer(mBufferp); 1825 gAudiop->cleanupBuffer(mBufferp);
1665 mBufferp = NULL; 1826 mBufferp = NULL;
1666 1827
1667 return FALSE; 1828 return false;
1668 } 1829 }
1669 mBufferp->mAudioDatap = this; 1830 mBufferp->mAudioDatap = this;
1670 return TRUE; 1831 return true;
1671} 1832}
1672 1833
1673 1834
diff --git a/linden/indra/llaudio/audioengine.h b/linden/indra/llaudio/audioengine.h
index e38413f..15cb35f 100644
--- a/linden/indra/llaudio/audioengine.h
+++ b/linden/indra/llaudio/audioengine.h
@@ -45,6 +45,8 @@
45#include "llframetimer.h" 45#include "llframetimer.h"
46#include "llassettype.h" 46#include "llassettype.h"
47 47
48class LLMediaBase;
49
48const F32 LL_WIND_UPDATE_INTERVAL = 0.1f; 50const F32 LL_WIND_UPDATE_INTERVAL = 0.1f;
49const F32 LL_ROLLOFF_MULTIPLIER_UNDER_WATER = 5.f; // How much sounds are weaker under water 51const F32 LL_ROLLOFF_MULTIPLIER_UNDER_WATER = 5.f; // How much sounds are weaker under water
50const F32 LL_WIND_UNDERWATER_CENTER_FREQ = 20.f; 52const F32 LL_WIND_UNDERWATER_CENTER_FREQ = 20.f;
@@ -67,6 +69,7 @@ class LLVFS;
67class LLAudioSource; 69class LLAudioSource;
68class LLAudioData; 70class LLAudioData;
69class LLAudioChannel; 71class LLAudioChannel;
72class LLAudioChannelOpenAL;
70class LLAudioBuffer; 73class LLAudioBuffer;
71 74
72 75
@@ -77,14 +80,24 @@ class LLAudioBuffer;
77 80
78class LLAudioEngine 81class LLAudioEngine
79{ 82{
83 friend class LLAudioChannelOpenAL; // bleh. channel needs some listener methods.
84
80public: 85public:
86 enum LLAudioType
87 {
88 AUDIO_TYPE_NONE = 0,
89 AUDIO_TYPE_SFX = 1,
90 AUDIO_TYPE_UI = 2,
91 AUDIO_TYPE_AMBIENT = 3,
92 AUDIO_TYPE_COUNT = 4 // last
93 };
94
81 LLAudioEngine(); 95 LLAudioEngine();
82 virtual ~LLAudioEngine(); 96 virtual ~LLAudioEngine();
83 97
84 // initialization/startup/shutdown 98 // initialization/startup/shutdown
85 //virtual BOOL init(); 99 virtual bool init(const S32 num_channels, void *userdata);
86 100 virtual std::string getDriverName(bool verbose) = 0;
87 virtual BOOL init(const S32 num_channels, void *userdata);
88 virtual void shutdown(); 101 virtual void shutdown();
89 102
90 // Used by the mechanics of the engine 103 // Used by the mechanics of the engine
@@ -97,18 +110,21 @@ public:
97 // 110 //
98 // "End user" functionality 111 // "End user" functionality
99 // 112 //
100 virtual BOOL isWindEnabled(); 113 virtual bool isWindEnabled();
101 virtual void enableWind(BOOL state_b); 114 virtual void enableWind(bool state_b);
102 115
103 // Use these for temporarily muting the audio system. 116 // Use these for temporarily muting the audio system.
104 // Does not change buffers, initialization, etc. but 117 // Does not change buffers, initialization, etc. but
105 // stops playing new sounds. 118 // stops playing new sounds.
106 virtual void setMuted(BOOL muted); 119 virtual void setMuted(bool muted);
107 virtual BOOL getMuted() const { return mMuted; } 120 virtual bool getMuted() const { return mMuted; }
108 121
109 F32 getMasterGain(); 122 F32 getMasterGain();
110 void setMasterGain(F32 gain); 123 void setMasterGain(F32 gain);
111 124
125 F32 getSecondaryGain(S32 type);
126 void setSecondaryGain(S32 type, F32 gain);
127
112 F32 getInternetStreamGain(); 128 F32 getInternetStreamGain();
113 129
114 virtual void setDopplerFactor(F32 factor); 130 virtual void setDopplerFactor(F32 factor);
@@ -122,8 +138,10 @@ public:
122 138
123 // Methods actually related to setting up and removing sounds 139 // Methods actually related to setting up and removing sounds
124 // Owner ID is the owner of the object making the request 140 // Owner ID is the owner of the object making the request
125 void triggerSound(const LLUUID &sound_id, const LLUUID& owner_id, const F32 gain, const LLVector3d &pos_global = LLVector3d::zero); 141 void triggerSound(const LLUUID &sound_id, const LLUUID& owner_id, const F32 gain,
126 BOOL preloadSound(const LLUUID &id); 142 const S32 type = LLAudioEngine::AUDIO_TYPE_NONE,
143 const LLVector3d &pos_global = LLVector3d::zero);
144 bool preloadSound(const LLUUID &id);
127 145
128 void addAudioSource(LLAudioSource *asp); 146 void addAudioSource(LLAudioSource *asp);
129 void cleanupAudioSource(LLAudioSource *asp); 147 void cleanupAudioSource(LLAudioSource *asp);
@@ -132,14 +150,16 @@ public:
132 LLAudioData *getAudioData(const LLUUID &audio_uuid); 150 LLAudioData *getAudioData(const LLUUID &audio_uuid);
133 151
134 152
135 virtual void startInternetStream(const std::string& url) = 0; 153 // Internet stream methods
136 virtual void stopInternetStream() = 0; 154 virtual void startInternetStream(const std::string& url);
137 virtual void pauseInternetStream(int pause) = 0; 155 virtual void stopInternetStream();
138 virtual int isInternetStreamPlaying() = 0; 156 virtual void pauseInternetStream(int pause);
139 virtual void getInternetStreamInfo(char* artist, char* title) { artist[0] = 0; title[0] = 0; } 157 virtual void updateInternetStream();
158 virtual int isInternetStreamPlaying();
159 virtual void getInternetStreamInfo(char* artist, char* title);
140 // use a value from 0.0 to 1.0, inclusive 160 // use a value from 0.0 to 1.0, inclusive
141 virtual void setInternetStreamGain(F32 vol) { mInternetStreamGain = vol; } 161 virtual void setInternetStreamGain(F32 vol);
142 virtual const std::string& getInternetStreamURL() { return LLStringUtil::null; } 162 virtual const std::string& getInternetStreamURL();
143 163
144 // For debugging usage 164 // For debugging usage
145 virtual LLVector3 getListenerPos(); 165 virtual LLVector3 getListenerPos();
@@ -148,17 +168,16 @@ public:
148 LLAudioChannel *getFreeChannel(const F32 priority); // Get a free channel or flush an existing one if your priority is higher 168 LLAudioChannel *getFreeChannel(const F32 priority); // Get a free channel or flush an existing one if your priority is higher
149 void cleanupBuffer(LLAudioBuffer *bufferp); 169 void cleanupBuffer(LLAudioBuffer *bufferp);
150 170
151 BOOL hasDecodedFile(const LLUUID &uuid); 171 bool hasDecodedFile(const LLUUID &uuid);
152 BOOL hasLocalFile(const LLUUID &uuid); 172 bool hasLocalFile(const LLUUID &uuid);
153 173
154 BOOL updateBufferForData(LLAudioData *adp, const LLUUID &audio_uuid = LLUUID::null); 174 bool updateBufferForData(LLAudioData *adp, const LLUUID &audio_uuid = LLUUID::null);
155 175
156 176
157 // Asset callback when we're retrieved a sound from the asset server. 177 // Asset callback when we're retrieved a sound from the asset server.
158 void startNextTransfer(); 178 void startNextTransfer();
159 static void assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 result_code, LLExtStat ext_status); 179 static void assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 result_code, LLExtStat ext_status);
160 180
161
162 friend class LLPipeline; // For debugging 181 friend class LLPipeline; // For debugging
163public: 182public:
164 F32 mMaxWindGain; // Hack. Public to set before fade in? 183 F32 mMaxWindGain; // Hack. Public to set before fade in?
@@ -176,11 +195,6 @@ protected:
176 virtual void allocateListener() = 0; 195 virtual void allocateListener() = 0;
177 196
178 197
179 // Internet stream methods
180 virtual void initInternetStream() {}
181 virtual void updateInternetStream() {}
182
183
184 // listener methods 198 // listener methods
185 virtual void setListenerPos(LLVector3 vec); 199 virtual void setListenerPos(LLVector3 vec);
186 virtual void setListenerVelocity(LLVector3 vec); 200 virtual void setListenerVelocity(LLVector3 vec);
@@ -195,13 +209,13 @@ protected:
195protected: 209protected:
196 LLListener *mListenerp; 210 LLListener *mListenerp;
197 211
198 BOOL mMuted; 212 bool mMuted;
199 void* mUserData; 213 void* mUserData;
200 214
201 S32 mLastStatus; 215 S32 mLastStatus;
202 216
203 S32 mNumChannels; 217 S32 mNumChannels;
204 BOOL mEnableWind; 218 bool mEnableWind;
205 219
206 LLUUID mCurrentTransfer; // Audio file currently being transferred by the system 220 LLUUID mCurrentTransfer; // Audio file currently being transferred by the system
207 LLFrameTimer mCurrentTransferTimer; 221 LLFrameTimer mCurrentTransferTimer;
@@ -222,9 +236,11 @@ protected:
222 LLAudioBuffer *mBuffers[MAX_BUFFERS]; 236 LLAudioBuffer *mBuffers[MAX_BUFFERS];
223 237
224 F32 mMasterGain; 238 F32 mMasterGain;
239 F32 mSecondaryGain[AUDIO_TYPE_COUNT];
225 240
226 // Hack! Internet streams are treated differently from other sources! 241 // Hack! Internet streams are treated differently from other sources!
227 F32 mInternetStreamGain; 242 F32 mInternetStreamGain;
243 std::string mInternetStreamURL;
228 244
229 F32 mNextWindUpdate; 245 F32 mNextWindUpdate;
230 246
@@ -232,6 +248,7 @@ protected:
232 248
233private: 249private:
234 void setDefaults(); 250 void setDefaults();
251 LLMediaBase *mInternetStreamMedia;
235}; 252};
236 253
237 254
@@ -247,7 +264,7 @@ class LLAudioSource
247public: 264public:
248 // owner_id is the id of the agent responsible for making this sound 265 // owner_id is the id of the agent responsible for making this sound
249 // play, for example, the owner of the object currently playing it 266 // play, for example, the owner of the object currently playing it
250 LLAudioSource(const LLUUID &id, const LLUUID& owner_id, const F32 gain); 267 LLAudioSource(const LLUUID &id, const LLUUID& owner_id, const F32 gain, const S32 type = LLAudioEngine::AUDIO_TYPE_NONE);
251 virtual ~LLAudioSource(); 268 virtual ~LLAudioSource();
252 269
253 virtual void update(); // Update this audio source 270 virtual void update(); // Update this audio source
@@ -255,24 +272,27 @@ public:
255 272
256 void preload(const LLUUID &audio_id); // Only used for preloading UI sounds, now. 273 void preload(const LLUUID &audio_id); // Only used for preloading UI sounds, now.
257 274
258 void addAudioData(LLAudioData *adp, BOOL set_current = TRUE); 275 void addAudioData(LLAudioData *adp, bool set_current = TRUE);
276
277 void setAmbient(const bool ambient) { mAmbient = ambient; }
278 bool isAmbient() const { return mAmbient; }
259 279
260 void setAmbient(const BOOL ambient) { mAmbient = ambient; } 280 void setLoop(const bool loop) { mLoop = loop; }
261 BOOL isAmbient() const { return mAmbient; } 281 bool isLoop() const { return mLoop; }
262 282
263 void setLoop(const BOOL loop) { mLoop = loop; } 283 void setSyncMaster(const bool master) { mSyncMaster = master; }
264 BOOL isLoop() const { return mLoop; } 284 bool isSyncMaster() const { return mSyncMaster; }
265 285
266 void setSyncMaster(const BOOL master) { mSyncMaster = master; } 286 void setSyncSlave(const bool slave) { mSyncSlave = slave; }
267 BOOL isSyncMaster() const { return mSyncMaster; } 287 bool isSyncSlave() const { return mSyncSlave; }
268 288
269 void setSyncSlave(const BOOL slave) { mSyncSlave = slave; } 289 void setQueueSounds(const bool queue) { mQueueSounds = queue; }
270 BOOL isSyncSlave() const { return mSyncSlave; } 290 bool isQueueSounds() const { return mQueueSounds; }
271 291
272 void setQueueSounds(const BOOL queue) { mQueueSounds = queue; } 292 void setPlayedOnce(const bool played_once) { mPlayedOnce = played_once; }
273 BOOL isQueueSounds() const { return mQueueSounds; }
274 293
275 void setPlayedOnce(const BOOL played_once) { mPlayedOnce = played_once; } 294 void setType(S32 type) { mType = type; }
295 S32 getType() { return mType; }
276 296
277 void setPositionGlobal(const LLVector3d &position_global) { mPositionGlobal = position_global; } 297 void setPositionGlobal(const LLVector3d &position_global) { mPositionGlobal = position_global; }
278 LLVector3d getPositionGlobal() const { return mPositionGlobal; } 298 LLVector3d getPositionGlobal() const { return mPositionGlobal; }
@@ -284,16 +304,16 @@ public:
284 virtual void setGain(const F32 gain) { mGain = llclamp(gain, 0.f, 1.f); } 304 virtual void setGain(const F32 gain) { mGain = llclamp(gain, 0.f, 1.f); }
285 305
286 const LLUUID &getID() const { return mID; } 306 const LLUUID &getID() const { return mID; }
287 BOOL isDone(); 307 bool isDone();
288 308
289 LLAudioData *getCurrentData(); 309 LLAudioData *getCurrentData();
290 LLAudioData *getQueuedData(); 310 LLAudioData *getQueuedData();
291 LLAudioBuffer *getCurrentBuffer(); 311 LLAudioBuffer *getCurrentBuffer();
292 312
293 BOOL setupChannel(); 313 bool setupChannel();
294 BOOL play(const LLUUID &audio_id); // Start the audio source playing 314 bool play(const LLUUID &audio_id); // Start the audio source playing
295 315
296 BOOL hasPendingPreloads() const; // Has preloads that haven't been done yet 316 bool hasPendingPreloads() const; // Has preloads that haven't been done yet
297 317
298 friend class LLAudioEngine; 318 friend class LLAudioEngine;
299 friend class LLAudioChannel; 319 friend class LLAudioChannel;
@@ -306,12 +326,13 @@ protected:
306 LLUUID mOwnerID; // owner of the object playing the sound 326 LLUUID mOwnerID; // owner of the object playing the sound
307 F32 mPriority; 327 F32 mPriority;
308 F32 mGain; 328 F32 mGain;
309 BOOL mAmbient; 329 bool mAmbient;
310 BOOL mLoop; 330 bool mLoop;
311 BOOL mSyncMaster; 331 bool mSyncMaster;
312 BOOL mSyncSlave; 332 bool mSyncSlave;
313 BOOL mQueueSounds; 333 bool mQueueSounds;
314 BOOL mPlayedOnce; 334 bool mPlayedOnce;
335 S32 mType;
315 LLVector3d mPositionGlobal; 336 LLVector3d mPositionGlobal;
316 LLVector3 mVelocity; 337 LLVector3 mVelocity;
317 338
@@ -340,27 +361,27 @@ class LLAudioData
340{ 361{
341public: 362public:
342 LLAudioData(const LLUUID &uuid); 363 LLAudioData(const LLUUID &uuid);
343 BOOL load(); 364 bool load();
344 365
345 LLUUID getID() const { return mID; } 366 LLUUID getID() const { return mID; }
346 LLAudioBuffer *getBuffer() const { return mBufferp; } 367 LLAudioBuffer *getBuffer() const { return mBufferp; }
347 368
348 BOOL hasLocalData() const { return mHasLocalData; } 369 bool hasLocalData() const { return mHasLocalData; }
349 BOOL hasDecodedData() const { return mHasDecodedData; } 370 bool hasDecodedData() const { return mHasDecodedData; }
350 BOOL hasValidData() const { return mHasValidData; } 371 bool hasValidData() const { return mHasValidData; }
351 372
352 void setHasLocalData(const BOOL hld) { mHasLocalData = hld; } 373 void setHasLocalData(const bool hld) { mHasLocalData = hld; }
353 void setHasDecodedData(const BOOL hdd) { mHasDecodedData = hdd; } 374 void setHasDecodedData(const bool hdd) { mHasDecodedData = hdd; }
354 void setHasValidData(const BOOL hvd) { mHasValidData = hvd; } 375 void setHasValidData(const bool hvd) { mHasValidData = hvd; }
355 376
356 friend class LLAudioEngine; // Severe laziness, bad. 377 friend class LLAudioEngine; // Severe laziness, bad.
357 378
358protected: 379protected:
359 LLUUID mID; 380 LLUUID mID;
360 LLAudioBuffer *mBufferp; // If this data is being used by the audio system, a pointer to the buffer will be set here. 381 LLAudioBuffer *mBufferp; // If this data is being used by the audio system, a pointer to the buffer will be set here.
361 BOOL mHasLocalData; 382 bool mHasLocalData;
362 BOOL mHasDecodedData; 383 bool mHasDecodedData;
363 BOOL mHasValidData; 384 bool mHasValidData;
364}; 385};
365 386
366 387
@@ -380,24 +401,28 @@ public:
380 virtual void setSource(LLAudioSource *sourcep); 401 virtual void setSource(LLAudioSource *sourcep);
381 LLAudioSource *getSource() const { return mCurrentSourcep; } 402 LLAudioSource *getSource() const { return mCurrentSourcep; }
382 403
404 void setSecondaryGain(F32 gain) { mSecondaryGain = gain; }
405 F32 getSecondaryGain() { return mSecondaryGain; }
406
383 friend class LLAudioEngine; 407 friend class LLAudioEngine;
384 friend class LLAudioSource; 408 friend class LLAudioSource;
385protected: 409protected:
386 virtual void play() = 0; 410 virtual void play() = 0;
387 virtual void playSynced(LLAudioChannel *channelp) = 0; 411 virtual void playSynced(LLAudioChannel *channelp) = 0;
388 virtual void cleanup() = 0; 412 virtual void cleanup() = 0;
389 virtual BOOL isPlaying() = 0; 413 virtual bool isPlaying() = 0;
390 void setWaiting(const BOOL waiting) { mWaiting = waiting; } 414 void setWaiting(const bool waiting) { mWaiting = waiting; }
391 BOOL isWaiting() const { return mWaiting; } 415 bool isWaiting() const { return mWaiting; }
392 416
393 virtual BOOL updateBuffer(); // Check to see if the buffer associated with the source changed, and update if necessary. 417 virtual bool updateBuffer(); // Check to see if the buffer associated with the source changed, and update if necessary.
394 virtual void update3DPosition() = 0; 418 virtual void update3DPosition() = 0;
395 virtual void updateLoop() = 0; // Update your loop/completion status, for use by queueing/syncing. 419 virtual void updateLoop() = 0; // Update your loop/completion status, for use by queueing/syncing.
396protected: 420protected:
397 LLAudioSource *mCurrentSourcep; 421 LLAudioSource *mCurrentSourcep;
398 LLAudioBuffer *mCurrentBufferp; 422 LLAudioBuffer *mCurrentBufferp;
399 BOOL mLoopedThisFrame; 423 bool mLoopedThisFrame;
400 BOOL mWaiting; // Waiting for sync. 424 bool mWaiting; // Waiting for sync.
425 F32 mSecondaryGain;
401}; 426};
402 427
403 428
@@ -412,14 +437,14 @@ class LLAudioBuffer
412{ 437{
413public: 438public:
414 virtual ~LLAudioBuffer() {}; 439 virtual ~LLAudioBuffer() {};
415 virtual BOOL loadWAV(const std::string& filename) = 0; 440 virtual bool loadWAV(const std::string& filename) = 0;
416 virtual U32 getLength() = 0; 441 virtual U32 getLength() = 0;
417 442
418 friend class LLAudioEngine; 443 friend class LLAudioEngine;
419 friend class LLAudioChannel; 444 friend class LLAudioChannel;
420 friend class LLAudioData; 445 friend class LLAudioData;
421protected: 446protected:
422 BOOL mInUse; 447 bool mInUse;
423 LLAudioData *mAudioDatap; 448 LLAudioData *mAudioDatap;
424 LLFrameTimer mLastUseTimer; 449 LLFrameTimer mLastUseTimer;
425}; 450};
diff --git a/linden/indra/llaudio/audioengine_fmod.cpp b/linden/indra/llaudio/audioengine_fmod.cpp
index 16d820c..354ef95 100644
--- a/linden/indra/llaudio/audioengine_fmod.cpp
+++ b/linden/indra/llaudio/audioengine_fmod.cpp
@@ -1,7 +1,6 @@
1/** 1/**
2 * @file audioengine_fmod.cpp 2 * @file audioengine_fmod.cpp
3 * @brief Implementation of LLAudioEngine class abstracting the audio 3 * @brief Implementation of LLAudioEngine class abstracting the audio support as a FMOD 3D implementation
4 * support as a FMOD 3D implementation
5 * 4 *
6 * $LicenseInfo:firstyear=2002&license=viewergpl$ 5 * $LicenseInfo:firstyear=2002&license=viewergpl$
7 * 6 *
@@ -46,27 +45,12 @@
46 45
47#include "sound_ids.h" 46#include "sound_ids.h"
48 47
48extern "C" {
49 void * F_CALLBACKAPI windCallback(void *originalbuffer, void *newbuffer, int length, void* userdata);
50}
49 51
50void * F_CALLBACKAPI windCallback(void *originalbuffer, void *newbuffer, int length, void* userdata);
51FSOUND_DSPUNIT *gWindDSP = NULL; 52FSOUND_DSPUNIT *gWindDSP = NULL;
52 53
53// These globals for the wind filter. Blech!
54F64 gbuf0 = 0.0;
55F64 gbuf1 = 0.0;
56F64 gbuf2 = 0.0;
57F64 gbuf3 = 0.0;
58F64 gbuf4 = 0.0;
59F64 gbuf5 = 0.0;
60F64 gY0 = 0.0;
61F64 gY1 = 0.0;
62
63F32 gTargetGain = 0.f;
64F32 gCurrentGain = 0.f;
65F32 gTargetFreq = 100.f;
66F32 gCurrentFreq = 100.f;
67F32 gTargetPanGainR = 0.5f;
68F32 gCurrentPanGainR = 0.5f;
69
70 54
71// Safe strcpy 55// Safe strcpy
72#if 0 //(unused) //LL_WINDOWS || LL_LINUX 56#if 0 //(unused) //LL_WINDOWS || LL_LINUX
@@ -94,9 +78,10 @@ static size_t strlcpy( char* dest, const char* src, size_t dst_size )
94 78
95LLAudioEngine_FMOD::LLAudioEngine_FMOD() 79LLAudioEngine_FMOD::LLAudioEngine_FMOD()
96{ 80{
97 mInited = FALSE; 81 mInited = false;
98 mCurrentInternetStreamp = NULL; 82 mCurrentInternetStreamp = NULL;
99 mInternetStreamChannel = -1; 83 mInternetStreamChannel = -1;
84 mWindGen = NULL;
100} 85}
101 86
102 87
@@ -105,7 +90,7 @@ LLAudioEngine_FMOD::~LLAudioEngine_FMOD()
105} 90}
106 91
107 92
108BOOL LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata) 93bool LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata)
109{ 94{
110 mFadeIn = -10000; 95 mFadeIn = -10000;
111 96
@@ -124,7 +109,7 @@ BOOL LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata)
124 { 109 {
125 LL_WARNS("AppInit") << "Error : You are using the wrong FMOD version (" << version 110 LL_WARNS("AppInit") << "Error : You are using the wrong FMOD version (" << version
126 << ")! You should be using FMOD " << FMOD_VERSION << LL_ENDL; 111 << ")! You should be using FMOD " << FMOD_VERSION << LL_ENDL;
127 //return FALSE; 112 //return false;
128 } 113 }
129 114
130 U32 fmod_flags = 0x0; 115 U32 fmod_flags = 0x0;
@@ -139,7 +124,7 @@ BOOL LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata)
139 { 124 {
140 LL_WARNS("AppInit") << "Error setting FMOD window: " 125 LL_WARNS("AppInit") << "Error setting FMOD window: "
141 << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL; 126 << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL;
142 return FALSE; 127 return false;
143 } 128 }
144 // Play audio when we don't have focus. 129 // Play audio when we don't have focus.
145 // (For example, IM client on top of us.) 130 // (For example, IM client on top of us.)
@@ -167,7 +152,7 @@ BOOL LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata)
167 // on top of ALSA is ironically more reliable than raw ALSA. 152 // on top of ALSA is ironically more reliable than raw ALSA.
168 // Ack, and ESD has more reliable failure modes - but has worse 153 // Ack, and ESD has more reliable failure modes - but has worse
169 // latency - than all of them, so wins for now. 154 // latency - than all of them, so wins for now.
170 BOOL audio_ok = FALSE; 155 bool audio_ok = false;
171 156
172 if (!audio_ok) 157 if (!audio_ok)
173 if (NULL == getenv("LL_BAD_ESD")) /*Flawfinder: ignore*/ 158 if (NULL == getenv("LL_BAD_ESD")) /*Flawfinder: ignore*/
@@ -178,7 +163,7 @@ BOOL LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata)
178 { 163 {
179 LL_DEBUGS("AppInit") << "ESD audio output initialized OKAY" 164 LL_DEBUGS("AppInit") << "ESD audio output initialized OKAY"
180 << LL_ENDL; 165 << LL_ENDL;
181 audio_ok = TRUE; 166 audio_ok = true;
182 } else { 167 } else {
183 LL_WARNS("AppInit") << "ESD audio output FAILED to initialize: " 168 LL_WARNS("AppInit") << "ESD audio output FAILED to initialize: "
184 << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL; 169 << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL;
@@ -195,7 +180,7 @@ BOOL LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata)
195 FSOUND_Init(44100, num_channels, fmod_flags)) 180 FSOUND_Init(44100, num_channels, fmod_flags))
196 { 181 {
197 LL_DEBUGS("AppInit") << "OSS audio output initialized OKAY" << LL_ENDL; 182 LL_DEBUGS("AppInit") << "OSS audio output initialized OKAY" << LL_ENDL;
198 audio_ok = TRUE; 183 audio_ok = true;
199 } else { 184 } else {
200 LL_WARNS("AppInit") << "OSS audio output FAILED to initialize: " 185 LL_WARNS("AppInit") << "OSS audio output FAILED to initialize: "
201 << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL; 186 << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL;
@@ -212,7 +197,7 @@ BOOL LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata)
212 FSOUND_Init(44100, num_channels, fmod_flags)) 197 FSOUND_Init(44100, num_channels, fmod_flags))
213 { 198 {
214 LL_DEBUGS("AppInit") << "ALSA audio output initialized OKAY" << LL_ENDL; 199 LL_DEBUGS("AppInit") << "ALSA audio output initialized OKAY" << LL_ENDL;
215 audio_ok = TRUE; 200 audio_ok = true;
216 } else { 201 } else {
217 LL_WARNS("AppInit") << "ALSA audio output FAILED to initialize: " 202 LL_WARNS("AppInit") << "ALSA audio output FAILED to initialize: "
218 << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL; 203 << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL;
@@ -224,7 +209,7 @@ BOOL LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata)
224 if (!audio_ok) 209 if (!audio_ok)
225 { 210 {
226 LL_WARNS("AppInit") << "Overall audio init failure." << LL_ENDL; 211 LL_WARNS("AppInit") << "Overall audio init failure." << LL_ENDL;
227 return FALSE; 212 return false;
228 } 213 }
229 214
230 // On Linux, FMOD causes a SIGPIPE for some netstream error 215 // On Linux, FMOD causes a SIGPIPE for some netstream error
@@ -250,7 +235,7 @@ BOOL LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata)
250 { 235 {
251 LL_WARNS("AppInit") << "Error initializing FMOD: " 236 LL_WARNS("AppInit") << "Error initializing FMOD: "
252 << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL; 237 << FMOD_ErrorString(FSOUND_GetError()) << LL_ENDL;
253 return FALSE; 238 return false;
254 } 239 }
255 240
256#endif 241#endif
@@ -259,17 +244,9 @@ BOOL LLAudioEngine_FMOD::init(const S32 num_channels, void* userdata)
259 244
260 LL_DEBUGS("AppInit") << "LLAudioEngine_FMOD::init() FMOD initialized correctly" << LL_ENDL; 245 LL_DEBUGS("AppInit") << "LLAudioEngine_FMOD::init() FMOD initialized correctly" << LL_ENDL;
261 246
262 mInited = TRUE; 247 mInited = true;
263 248
264 return TRUE; 249 return true;
265}
266
267
268void LLAudioEngine_FMOD::idle(F32 max_decode_time)
269{
270 LLAudioEngine::idle(max_decode_time);
271
272 updateInternetStream();
273} 250}
274 251
275 252
@@ -287,7 +264,7 @@ void LLAudioEngine_FMOD::shutdown()
287{ 264{
288 if (gWindDSP) 265 if (gWindDSP)
289 { 266 {
290 FSOUND_DSP_SetActive(gWindDSP,FALSE); 267 FSOUND_DSP_SetActive(gWindDSP,false);
291 FSOUND_DSP_Free(gWindDSP); 268 FSOUND_DSP_Free(gWindDSP);
292 } 269 }
293 270
@@ -318,13 +295,15 @@ LLAudioChannel *LLAudioEngine_FMOD::createChannel()
318 295
319void LLAudioEngine_FMOD::initWind() 296void LLAudioEngine_FMOD::initWind()
320{ 297{
298 mWindGen = new LLWindGen<MIXBUFFERFORMAT>;
299
321 if (!gWindDSP) 300 if (!gWindDSP)
322 { 301 {
323 gWindDSP = FSOUND_DSP_Create(&windCallback, FSOUND_DSP_DEFAULTPRIORITY_CLEARUNIT + 20, NULL); 302 gWindDSP = FSOUND_DSP_Create(&windCallback, FSOUND_DSP_DEFAULTPRIORITY_CLEARUNIT + 20, mWindGen);
324 } 303 }
325 if (gWindDSP) 304 if (gWindDSP)
326 { 305 {
327 FSOUND_DSP_SetActive(gWindDSP, TRUE); 306 FSOUND_DSP_SetActive(gWindDSP, true);
328 } 307 }
329 mNextWindUpdate = 0.0; 308 mNextWindUpdate = 0.0;
330} 309}
@@ -334,10 +313,13 @@ void LLAudioEngine_FMOD::cleanupWind()
334{ 313{
335 if (gWindDSP) 314 if (gWindDSP)
336 { 315 {
337 FSOUND_DSP_SetActive(gWindDSP, FALSE); 316 FSOUND_DSP_SetActive(gWindDSP, false);
338 FSOUND_DSP_Free(gWindDSP); 317 FSOUND_DSP_Free(gWindDSP);
339 gWindDSP = NULL; 318 gWindDSP = NULL;
340 } 319 }
320
321 delete mWindGen;
322 mWindGen = NULL;
341} 323}
342 324
343 325
@@ -367,9 +349,9 @@ void LLAudioEngine_FMOD::updateWind(LLVector3 wind_vec, F32 camera_height_above_
367 pitch = 1.0 + mapWindVecToPitch(wind_vec); 349 pitch = 1.0 + mapWindVecToPitch(wind_vec);
368 center_freq = 80.0 * pow(pitch,2.5*(mapWindVecToGain(wind_vec)+1.0)); 350 center_freq = 80.0 * pow(pitch,2.5*(mapWindVecToGain(wind_vec)+1.0));
369 351
370 gTargetFreq = (F32)center_freq; 352 mWindGen->mTargetFreq = (F32)center_freq;
371 gTargetGain = (F32)mapWindVecToGain(wind_vec) * mMaxWindGain; 353 mWindGen->mTargetGain = (F32)mapWindVecToGain(wind_vec) * mMaxWindGain;
372 gTargetPanGainR = (F32)mapWindVecToPan(wind_vec); 354 mWindGen->mTargetPanGainR = (F32)mapWindVecToPan(wind_vec);
373 } 355 }
374} 356}
375 357
@@ -457,11 +439,11 @@ LLAudioChannelFMOD::~LLAudioChannelFMOD()
457} 439}
458 440
459 441
460BOOL LLAudioChannelFMOD::updateBuffer() 442bool LLAudioChannelFMOD::updateBuffer()
461{ 443{
462 if (LLAudioChannel::updateBuffer()) 444 if (LLAudioChannel::updateBuffer())
463 { 445 {
464 // Base class update returned TRUE, which means that we need to actually 446 // Base class update returned true, which means that we need to actually
465 // set up the channel for a different buffer. 447 // set up the channel for a different buffer.
466 448
467 LLAudioBufferFMOD *bufferp = (LLAudioBufferFMOD *)mCurrentSourcep->getCurrentBuffer(); 449 LLAudioBufferFMOD *bufferp = (LLAudioBufferFMOD *)mCurrentSourcep->getCurrentBuffer();
@@ -473,13 +455,13 @@ BOOL LLAudioChannelFMOD::updateBuffer()
473 // This is bad, there should ALWAYS be a sample associated with a legit 455 // This is bad, there should ALWAYS be a sample associated with a legit
474 // buffer. 456 // buffer.
475 llerrs << "No FMOD sample!" << llendl; 457 llerrs << "No FMOD sample!" << llendl;
476 return FALSE; 458 return false;
477 } 459 }
478 460
479 461
480 // Actually play the sound. Start it off paused so we can do all the necessary 462 // Actually play the sound. Start it off paused so we can do all the necessary
481 // setup. 463 // setup.
482 mChannelID = FSOUND_PlaySoundEx(FSOUND_FREE, samplep, FSOUND_DSP_GetSFXUnit(), TRUE); 464 mChannelID = FSOUND_PlaySoundEx(FSOUND_FREE, samplep, FSOUND_DSP_GetSFXUnit(), true);
483 465
484 //llinfos << "Setting up channel " << std::hex << mChannelID << std::dec << llendl; 466 //llinfos << "Setting up channel " << std::hex << mChannelID << std::dec << llendl;
485 } 467 }
@@ -501,7 +483,7 @@ BOOL LLAudioChannelFMOD::updateBuffer()
501 } 483 }
502 } 484 }
503 485
504 return TRUE; 486 return true;
505} 487}
506 488
507 489
@@ -524,12 +506,12 @@ void LLAudioChannelFMOD::update3DPosition()
524 if (mCurrentSourcep->isAmbient()) 506 if (mCurrentSourcep->isAmbient())
525 { 507 {
526 // Ambient sound, don't need to do any positional updates. 508 // Ambient sound, don't need to do any positional updates.
527 bufferp->set3DMode(FALSE); 509 bufferp->set3DMode(false);
528 } 510 }
529 else 511 else
530 { 512 {
531 // Localized sound. Update the position and velocity of the sound. 513 // Localized sound. Update the position and velocity of the sound.
532 bufferp->set3DMode(TRUE); 514 bufferp->set3DMode(true);
533 515
534 LLVector3 float_pos; 516 LLVector3 float_pos;
535 float_pos.setVec(mCurrentSourcep->getPositionGlobal()); 517 float_pos.setVec(mCurrentSourcep->getPositionGlobal());
@@ -556,7 +538,7 @@ void LLAudioChannelFMOD::updateLoop()
556 U32 cur_pos = FSOUND_GetCurrentPosition(mChannelID); 538 U32 cur_pos = FSOUND_GetCurrentPosition(mChannelID);
557 if (cur_pos < (U32)mLastSamplePos) 539 if (cur_pos < (U32)mLastSamplePos)
558 { 540 {
559 mLoopedThisFrame = TRUE; 541 mLoopedThisFrame = true;
560 } 542 }
561 mLastSamplePos = cur_pos; 543 mLastSamplePos = cur_pos;
562} 544}
@@ -589,11 +571,11 @@ void LLAudioChannelFMOD::play()
589 return; 571 return;
590 } 572 }
591 573
592 if (!FSOUND_SetPaused(mChannelID, FALSE)) 574 if (!FSOUND_SetPaused(mChannelID, false))
593 { 575 {
594 llwarns << "LLAudioChannelFMOD::play error: " << FMOD_ErrorString(FSOUND_GetError()) << llendl; 576 llwarns << "LLAudioChannelFMOD::play error: " << FMOD_ErrorString(FSOUND_GetError()) << llendl;
595 } 577 }
596 getSource()->setPlayedOnce(TRUE); 578 getSource()->setPlayedOnce(true);
597} 579}
598 580
599 581
@@ -618,11 +600,11 @@ void LLAudioChannelFMOD::playSynced(LLAudioChannel *channelp)
618} 600}
619 601
620 602
621BOOL LLAudioChannelFMOD::isPlaying() 603bool LLAudioChannelFMOD::isPlaying()
622{ 604{
623 if (!mChannelID) 605 if (!mChannelID)
624 { 606 {
625 return FALSE; 607 return false;
626 } 608 }
627 609
628 return FSOUND_IsPlaying(mChannelID) && (!FSOUND_GetPaused(mChannelID)); 610 return FSOUND_IsPlaying(mChannelID) && (!FSOUND_GetPaused(mChannelID));
@@ -652,14 +634,14 @@ LLAudioBufferFMOD::~LLAudioBufferFMOD()
652} 634}
653 635
654 636
655BOOL LLAudioBufferFMOD::loadWAV(const std::string& filename) 637bool LLAudioBufferFMOD::loadWAV(const std::string& filename)
656{ 638{
657 // Try to open a wav file from disk. This will eventually go away, as we don't 639 // Try to open a wav file from disk. This will eventually go away, as we don't
658 // really want to block doing this. 640 // really want to block doing this.
659 if (filename.empty()) 641 if (filename.empty())
660 { 642 {
661 // invalid filename, abort. 643 // invalid filename, abort.
662 return FALSE; 644 return false;
663 } 645 }
664 646
665 S32 file_size = 0; 647 S32 file_size = 0;
@@ -667,7 +649,7 @@ BOOL LLAudioBufferFMOD::loadWAV(const std::string& filename)
667 if (!apr_file) 649 if (!apr_file)
668 { 650 {
669 // File not found, abort. 651 // File not found, abort.
670 return FALSE; 652 return false;
671 } 653 }
672 apr_file_close(apr_file); 654 apr_file_close(apr_file);
673 655
@@ -717,11 +699,11 @@ BOOL LLAudioBufferFMOD::loadWAV(const std::string& filename)
717 // 699 //
718 // file is probably corrupt - remove it. 700 // file is probably corrupt - remove it.
719 LLFile::remove(filename); 701 LLFile::remove(filename);
720 return FALSE; 702 return false;
721 } 703 }
722 704
723 // Everything went well, return TRUE 705 // Everything went well, return true
724 return TRUE; 706 return true;
725} 707}
726 708
727 709
@@ -736,7 +718,7 @@ U32 LLAudioBufferFMOD::getLength()
736} 718}
737 719
738 720
739void LLAudioBufferFMOD::set3DMode(BOOL use3d) 721void LLAudioBufferFMOD::set3DMode(bool use3d)
740{ 722{
741 U16 current_mode = FSOUND_Sample_GetMode(mSamplep); 723 U16 current_mode = FSOUND_Sample_GetMode(mSamplep);
742 724
@@ -765,7 +747,7 @@ void LLAudioEngine_FMOD::initInternetStream()
765{ 747{
766 // Number of milliseconds of audio to buffer for the audio card. 748 // Number of milliseconds of audio to buffer for the audio card.
767 // Must be larger than the usual Second Life frame stutter time. 749 // Must be larger than the usual Second Life frame stutter time.
768 FSOUND_Stream_SetBufferSize(200); 750 FSOUND_Stream_SetBufferSize(200);
769 751
770 // Here's where we set the size of the network buffer and some buffering 752 // Here's where we set the size of the network buffer and some buffering
771 // parameters. In this case we want a network buffer of 16k, we want it 753 // parameters. In this case we want a network buffer of 16k, we want it
@@ -810,19 +792,19 @@ signed char F_CALLBACKAPI LLAudioEngine_FMOD::callbackMetaData(char *name, char
810 if (!strcmp("ARTIST", name)) 792 if (!strcmp("ARTIST", name))
811 { 793 {
812 strlcpy(self->mInternetStreamArtist, value, 256); 794 strlcpy(self->mInternetStreamArtist, value, 256);
813 self->mInternetStreamNewMetaData = TRUE; 795 self->mInternetStreamNewMetaData = true;
814 return TRUE; 796 return true;
815 } 797 }
816 798
817 if (!strcmp("TITLE", name)) 799 if (!strcmp("TITLE", name))
818 { 800 {
819 strlcpy(self->mInternetStreamTitle, value, 256); 801 strlcpy(self->mInternetStreamTitle, value, 256);
820 self->mInternetStreamNewMetaData = TRUE; 802 self->mInternetStreamNewMetaData = true;
821 return TRUE; 803 return true;
822 } 804 }
823 */ 805 */
824 806
825 return TRUE; 807 return true;
826} 808}
827 809
828 810
@@ -867,7 +849,7 @@ void LLAudioEngine_FMOD::updateInternetStream()
867 { 849 {
868 // Reset volume to previously set volume 850 // Reset volume to previously set volume
869 setInternetStreamGain(mInternetStreamGain); 851 setInternetStreamGain(mInternetStreamGain);
870 FSOUND_SetPaused(mInternetStreamChannel, FALSE); 852 FSOUND_SetPaused(mInternetStreamChannel, false);
871 //FSOUND_Stream_Net_SetMetadataCallback(mInternetStream, callbackMetaData, this); 853 //FSOUND_Stream_Net_SetMetadataCallback(mInternetStream, callbackMetaData, this);
872 } 854 }
873 } 855 }
@@ -909,7 +891,7 @@ void LLAudioEngine_FMOD::stopInternetStream()
909{ 891{
910 if (mInternetStreamChannel != -1) 892 if (mInternetStreamChannel != -1)
911 { 893 {
912 FSOUND_SetPaused(mInternetStreamChannel, TRUE); 894 FSOUND_SetPaused(mInternetStreamChannel, true);
913 FSOUND_SetPriority(mInternetStreamChannel, 0); 895 FSOUND_SetPriority(mInternetStreamChannel, 0);
914 mInternetStreamChannel = -1; 896 mInternetStreamChannel = -1;
915 } 897 }
@@ -971,16 +953,10 @@ int LLAudioEngine_FMOD::isInternetStreamPlaying()
971} 953}
972 954
973 955
974void LLAudioEngine_FMOD::getInternetStreamInfo(char* artist_out, char* title_out)
975{
976 //strlcpy(artist_out, mInternetStreamArtist, 256);
977 //strlcpy(title_out, mInternetStreamTitle, 256);
978}
979
980
981void LLAudioEngine_FMOD::setInternetStreamGain(F32 vol) 956void LLAudioEngine_FMOD::setInternetStreamGain(F32 vol)
982{ 957{
983 LLAudioEngine::setInternetStreamGain(vol); 958 mInternetStreamGain = vol;
959
984 if (mInternetStreamChannel != -1) 960 if (mInternetStreamChannel != -1)
985 { 961 {
986 vol = llclamp(vol, 0.f, 1.f); 962 vol = llclamp(vol, 0.f, 1.f);
@@ -990,15 +966,9 @@ void LLAudioEngine_FMOD::setInternetStreamGain(F32 vol)
990} 966}
991 967
992 968
993const std::string& LLAudioEngine_FMOD::getInternetStreamURL()
994{
995 return mInternetStreamURL;
996}
997
998
999LLAudioStreamFMOD::LLAudioStreamFMOD(const std::string& url) : 969LLAudioStreamFMOD::LLAudioStreamFMOD(const std::string& url) :
1000 mInternetStream(NULL), 970 mInternetStream(NULL),
1001 mReady(FALSE) 971 mReady(false)
1002{ 972{
1003 mInternetStreamURL = url; 973 mInternetStreamURL = url;
1004 mInternetStream = FSOUND_Stream_Open(url.c_str(), FSOUND_NORMAL | FSOUND_NONBLOCKING, 0, 0); 974 mInternetStream = FSOUND_Stream_Open(url.c_str(), FSOUND_NORMAL | FSOUND_NONBLOCKING, 0, 0);
@@ -1007,11 +977,11 @@ LLAudioStreamFMOD::LLAudioStreamFMOD(const std::string& url) :
1007 llwarns << "Couldn't open fmod stream, error " 977 llwarns << "Couldn't open fmod stream, error "
1008 << FMOD_ErrorString(FSOUND_GetError()) 978 << FMOD_ErrorString(FSOUND_GetError())
1009 << llendl; 979 << llendl;
1010 mReady = FALSE; 980 mReady = false;
1011 return; 981 return;
1012 } 982 }
1013 983
1014 mReady = TRUE; 984 mReady = true;
1015} 985}
1016 986
1017int LLAudioStreamFMOD::startStream() 987int LLAudioStreamFMOD::startStream()
@@ -1026,10 +996,10 @@ int LLAudioStreamFMOD::startStream()
1026 // Make sure the stream is set to 2D mode. 996 // Make sure the stream is set to 2D mode.
1027 FSOUND_Stream_SetMode(mInternetStream, FSOUND_2D); 997 FSOUND_Stream_SetMode(mInternetStream, FSOUND_2D);
1028 998
1029 return FSOUND_Stream_PlayEx(FSOUND_FREE, mInternetStream, NULL, TRUE); 999 return FSOUND_Stream_PlayEx(FSOUND_FREE, mInternetStream, NULL, true);
1030} 1000}
1031 1001
1032BOOL LLAudioStreamFMOD::stopStream() 1002bool LLAudioStreamFMOD::stopStream()
1033{ 1003{
1034 if (mInternetStream) 1004 if (mInternetStream)
1035 { 1005 {
@@ -1039,34 +1009,34 @@ BOOL LLAudioStreamFMOD::stopStream()
1039 unsigned int flags = 0x0; 1009 unsigned int flags = 0x0;
1040 FSOUND_Stream_Net_GetStatus(mInternetStream, &status, &read_percent, &bitrate, &flags); 1010 FSOUND_Stream_Net_GetStatus(mInternetStream, &status, &read_percent, &bitrate, &flags);
1041 1011
1042 BOOL close = TRUE; 1012 bool close = true;
1043 switch (status) 1013 switch (status)
1044 { 1014 {
1045 case FSOUND_STREAM_NET_CONNECTING: 1015 case FSOUND_STREAM_NET_CONNECTING:
1046 close = FALSE; 1016 close = false;
1047 break; 1017 break;
1048 case FSOUND_STREAM_NET_NOTCONNECTED: 1018 case FSOUND_STREAM_NET_NOTCONNECTED:
1049 case FSOUND_STREAM_NET_BUFFERING: 1019 case FSOUND_STREAM_NET_BUFFERING:
1050 case FSOUND_STREAM_NET_READY: 1020 case FSOUND_STREAM_NET_READY:
1051 case FSOUND_STREAM_NET_ERROR: 1021 case FSOUND_STREAM_NET_ERROR:
1052 default: 1022 default:
1053 close = TRUE; 1023 close = true;
1054 } 1024 }
1055 1025
1056 if (close) 1026 if (close)
1057 { 1027 {
1058 FSOUND_Stream_Close(mInternetStream); 1028 FSOUND_Stream_Close(mInternetStream);
1059 mInternetStream = NULL; 1029 mInternetStream = NULL;
1060 return TRUE; 1030 return true;
1061 } 1031 }
1062 else 1032 else
1063 { 1033 {
1064 return FALSE; 1034 return false;
1065 } 1035 }
1066 } 1036 }
1067 else 1037 else
1068 { 1038 {
1069 return TRUE; 1039 return true;
1070 } 1040 }
1071} 1041}
1072 1042
@@ -1076,94 +1046,35 @@ int LLAudioStreamFMOD::getOpenState()
1076 return open_state; 1046 return open_state;
1077} 1047}
1078 1048
1079/* This determines the format of the mixbuffer being passed in. change if you want to support int32 or float32 */ 1049void * F_CALLBACKAPI windCallback(void *originalbuffer, void *newbuffer, int length, void* userdata)
1080#if LL_DARWIN
1081 #define MIXBUFFERFORMAT S32
1082#else
1083 #define MIXBUFFERFORMAT S16
1084#endif
1085
1086inline MIXBUFFERFORMAT clipSample(MIXBUFFERFORMAT sample, MIXBUFFERFORMAT min, MIXBUFFERFORMAT max)
1087{
1088 if (sample > max)
1089 sample = max;
1090 else if (sample < min)
1091 sample = min;
1092
1093 return sample;
1094}
1095
1096void * F_CALLBACKAPI windCallback(void *originalbuffer, void *newbuffer, int length, void*)
1097{ 1050{
1098// originalbuffer = fsounds original mixbuffer. 1051 // originalbuffer = fmod's original mixbuffer.
1099// newbuffer = the buffer passed from the previous DSP unit. 1052 // newbuffer = the buffer passed from the previous DSP unit.
1100// length = length in samples at this mix time. 1053 // length = length in samples at this mix time.
1101// param = user parameter passed through in FSOUND_DSP_Create. 1054 // param = user parameter passed through in FSOUND_DSP_Create.
1102// 1055 //
1103// modify the buffer in some fashion 1056 // modify the buffer in some fashion
1104 1057
1105 U8 *cursamplep = (U8*)newbuffer; 1058 LLWindGen<LLAudioEngine_FMOD::MIXBUFFERFORMAT> *windgen =
1106 U8 wordsize = 2; 1059 (LLWindGen<LLAudioEngine_FMOD::MIXBUFFERFORMAT> *)userdata;
1060 U8 stride;
1107 1061
1108#if LL_DARWIN 1062#if LL_DARWIN
1109 wordsize = sizeof(MIXBUFFERFORMAT); 1063 stride = sizeof(LLAudioEngine_FMOD::MIXBUFFERFORMAT);
1110#else 1064#else
1111 int mixertype = FSOUND_GetMixer(); 1065 int mixertype = FSOUND_GetMixer();
1112 if (mixertype == FSOUND_MIXER_BLENDMODE || mixertype == FSOUND_MIXER_QUALITY_FPU) 1066 if (mixertype == FSOUND_MIXER_BLENDMODE ||
1113 { 1067 mixertype == FSOUND_MIXER_QUALITY_FPU)
1114 wordsize = 4; 1068 {
1115 } 1069 stride = 4;
1116#endif 1070 }
1117 1071 else
1118 double bandwidth = 50; 1072 {
1119 double inputSamplingRate = 44100; 1073 stride = 2;
1120 double a0,b1,b2; 1074 }
1121
1122 // calculate resonant filter coeffs
1123 b2 = exp(-(F_TWO_PI) * (bandwidth / inputSamplingRate));
1124
1125 while (length--)
1126 {
1127 gCurrentFreq = (float)((0.999 * gCurrentFreq) + (0.001 * gTargetFreq));
1128 gCurrentGain = (float)((0.999 * gCurrentGain) + (0.001 * gTargetGain));
1129 gCurrentPanGainR = (float)((0.999 * gCurrentPanGainR) + (0.001 * gTargetPanGainR));
1130 b1 = (-4.0 * b2) / (1.0 + b2) * cos(F_TWO_PI * (gCurrentFreq / inputSamplingRate));
1131 a0 = (1.0 - b2) * sqrt(1.0 - (b1 * b1) / (4.0 * b2));
1132 double nextSample;
1133
1134 // start with white noise
1135 nextSample = ll_frand(2.0f) - 1.0f;
1136
1137#if 1 // LLAE_WIND_PINK apply pinking filter
1138 gbuf0 = 0.997f * gbuf0 + 0.0126502f * nextSample;
1139 gbuf1 = 0.985f * gbuf1 + 0.0139083f * nextSample;
1140 gbuf2 = 0.950f * gbuf2 + 0.0205439f * nextSample;
1141 gbuf3 = 0.850f * gbuf3 + 0.0387225f * nextSample;
1142 gbuf4 = 0.620f * gbuf4 + 0.0465932f * nextSample;
1143 gbuf5 = 0.250f * gbuf5 + 0.1093477f * nextSample;
1144
1145 nextSample = gbuf0 + gbuf1 + gbuf2 + gbuf3 + gbuf4 + gbuf5;
1146#endif
1147
1148#if 1 //LLAE_WIND_RESONANT // do a resonant filter on the noise
1149 nextSample = (double)( a0 * nextSample - b1 * gY0 - b2 * gY1 );
1150
1151 gY1 = gY0;
1152 gY0 = nextSample;
1153#endif 1075#endif
1154 1076
1155 nextSample *= gCurrentGain; 1077 newbuffer = windgen->windGenerate((LLAudioEngine_FMOD::MIXBUFFERFORMAT *)newbuffer, length, stride);
1156
1157 MIXBUFFERFORMAT sample;
1158
1159 sample = llfloor(((F32)nextSample*32768.f*(1.0f - gCurrentPanGainR))+0.5f);
1160 *(MIXBUFFERFORMAT*)cursamplep = clipSample((*(MIXBUFFERFORMAT*)cursamplep) + sample, -32768, 32767);
1161 cursamplep += wordsize;
1162
1163 sample = llfloor(((F32)nextSample*32768.f*gCurrentPanGainR)+0.5f);
1164 *(MIXBUFFERFORMAT*)cursamplep = clipSample((*(MIXBUFFERFORMAT*)cursamplep) + sample, -32768, 32767);
1165 cursamplep += wordsize;
1166 }
1167 1078
1168 return newbuffer; 1079 return newbuffer;
1169} 1080}
diff --git a/linden/indra/llaudio/audioengine_fmod.h b/linden/indra/llaudio/audioengine_fmod.h
index 41177b6..132afb1 100644
--- a/linden/indra/llaudio/audioengine_fmod.h
+++ b/linden/indra/llaudio/audioengine_fmod.h
@@ -35,6 +35,7 @@
35 35
36#include "audioengine.h" 36#include "audioengine.h"
37#include "listener_fmod.h" 37#include "listener_fmod.h"
38#include "windgen.h"
38 39
39#include "fmod.h" 40#include "fmod.h"
40 41
@@ -47,13 +48,11 @@ public:
47 virtual ~LLAudioEngine_FMOD(); 48 virtual ~LLAudioEngine_FMOD();
48 49
49 // initialization/startup/shutdown 50 // initialization/startup/shutdown
50 virtual BOOL init(const S32 num_channels, void *user_data); 51 virtual bool init(const S32 num_channels, void *user_data);
51 virtual void allocateListener(); 52 virtual void allocateListener();
52 53
53 virtual void shutdown(); 54 virtual void shutdown();
54 55
55 virtual void idle(F32 max_decode_time = 0.f);
56
57 // Internet stream methods 56 // Internet stream methods
58 virtual void initInternetStream(); 57 virtual void initInternetStream();
59 virtual void startInternetStream(const std::string& url); 58 virtual void startInternetStream(const std::string& url);
@@ -61,15 +60,19 @@ public:
61 virtual void stopInternetStream(); 60 virtual void stopInternetStream();
62 virtual void pauseInternetStream(int pause); 61 virtual void pauseInternetStream(int pause);
63 virtual int isInternetStreamPlaying(); 62 virtual int isInternetStreamPlaying();
64 virtual void getInternetStreamInfo(char* artist, char* title);
65 virtual void setInternetStreamGain(F32 vol); 63 virtual void setInternetStreamGain(F32 vol);
66 virtual const std::string& getInternetStreamURL();
67 64
68 /*virtual*/ void initWind(); 65 /*virtual*/ void initWind();
69 /*virtual*/ void cleanupWind(); 66 /*virtual*/ void cleanupWind();
70 67
71 /*virtual*/void updateWind(LLVector3 direction, F32 camera_height_above_water); 68 /*virtual*/void updateWind(LLVector3 direction, F32 camera_height_above_water);
72 69
70#if LL_DARWIN
71 typedef S32 MIXBUFFERFORMAT;
72#else
73 typedef S16 MIXBUFFERFORMAT;
74#endif
75
73protected: 76protected:
74 /*virtual*/ LLAudioBuffer *createBuffer(); // Get a free buffer, or flush an existing one if you have to. 77 /*virtual*/ LLAudioBuffer *createBuffer(); // Get a free buffer, or flush an existing one if you have to.
75 /*virtual*/ LLAudioChannel *createChannel(); // Create a new audio channel. 78 /*virtual*/ LLAudioChannel *createChannel(); // Create a new audio channel.
@@ -79,7 +82,6 @@ protected:
79 static signed char F_CALLBACKAPI callbackMetaData(char* name, char* value, void* userdata); 82 static signed char F_CALLBACKAPI callbackMetaData(char* name, char* value, void* userdata);
80 83
81 LLAudioStreamFMOD *mCurrentInternetStreamp; 84 LLAudioStreamFMOD *mCurrentInternetStreamp;
82 std::string mInternetStreamURL;
83 int mInternetStreamChannel; 85 int mInternetStreamChannel;
84 86
85 std::list<LLAudioStreamFMOD *> mDeadStreams; 87 std::list<LLAudioStreamFMOD *> mDeadStreams;
@@ -88,11 +90,12 @@ protected:
88 //F32 mMaxDistance[MAX_BUFFERS]; 90 //F32 mMaxDistance[MAX_BUFFERS];
89 91
90 S32 mFadeIn; 92 S32 mFadeIn;
91 BOOL mInited; 93 bool mInited;
92 94
93 // On Windows, userdata is the HWND of the application window. 95 // On Windows, userdata is the HWND of the application window.
94 void* mUserData; 96 void* mUserData;
95 97
98 LLWindGen<MIXBUFFERFORMAT> *mWindGen;
96}; 99};
97 100
98 101
@@ -106,9 +109,9 @@ protected:
106 /*virtual*/ void play(); 109 /*virtual*/ void play();
107 /*virtual*/ void playSynced(LLAudioChannel *channelp); 110 /*virtual*/ void playSynced(LLAudioChannel *channelp);
108 /*virtual*/ void cleanup(); 111 /*virtual*/ void cleanup();
109 /*virtual*/ BOOL isPlaying(); 112 /*virtual*/ bool isPlaying();
110 113
111 /*virtual*/ BOOL updateBuffer(); 114 /*virtual*/ bool updateBuffer();
112 /*virtual*/ void update3DPosition(); 115 /*virtual*/ void update3DPosition();
113 /*virtual*/ void updateLoop(); 116 /*virtual*/ void updateLoop();
114 117
@@ -124,11 +127,11 @@ public:
124 LLAudioBufferFMOD(); 127 LLAudioBufferFMOD();
125 virtual ~LLAudioBufferFMOD(); 128 virtual ~LLAudioBufferFMOD();
126 129
127 /*virtual*/ BOOL loadWAV(const std::string& filename); 130 /*virtual*/ bool loadWAV(const std::string& filename);
128 /*virtual*/ U32 getLength(); 131 /*virtual*/ U32 getLength();
129 friend class LLAudioChannelFMOD; 132 friend class LLAudioChannelFMOD;
130 133
131 void set3DMode(BOOL use3d); 134 void set3DMode(bool use3d);
132protected: 135protected:
133 FSOUND_SAMPLE *getSample() { return mSamplep; } 136 FSOUND_SAMPLE *getSample() { return mSamplep; }
134protected: 137protected:
@@ -140,15 +143,15 @@ class LLAudioStreamFMOD
140public: 143public:
141 LLAudioStreamFMOD(const std::string& url); 144 LLAudioStreamFMOD(const std::string& url);
142 int startStream(); 145 int startStream();
143 BOOL stopStream(); // Returns true if the stream was successfully stopped. 146 bool stopStream(); // Returns true if the stream was successfully stopped.
144 BOOL ready(); 147 bool ready();
145 148
146 const std::string& getURL() { return mInternetStreamURL; } 149 const std::string& getURL() { return mInternetStreamURL; }
147 150
148 int getOpenState(); 151 int getOpenState();
149protected: 152protected:
150 FSOUND_STREAM* mInternetStream; 153 FSOUND_STREAM* mInternetStream;
151 BOOL mReady; 154 bool mReady;
152 155
153 std::string mInternetStreamURL; 156 std::string mInternetStreamURL;
154}; 157};
diff --git a/linden/indra/llaudio/audioengine_openal.cpp b/linden/indra/llaudio/audioengine_openal.cpp
new file mode 100644
index 0000000..a956131
--- /dev/null
+++ b/linden/indra/llaudio/audioengine_openal.cpp
@@ -0,0 +1,544 @@
1/**
2 * @file audioengine_openal.cpp
3 * @brief implementation of audio engine using OpenAL
4 * support as a OpenAL 3D implementation
5 *
6 * $LicenseInfo:firstyear=2002&license=viewergpl$
7 *
8 * Copyright (c) 2002-2008, Linden Research, Inc.
9 *
10 * Second Life Viewer Source Code
11 * The source code in this file ("Source Code") is provided by Linden Lab
12 * to you under the terms of the GNU General Public License, version 2.0
13 * ("GPL"), unless you have obtained a separate licensing agreement
14 * ("Other License"), formally executed by you and Linden Lab. Terms of
15 * the GPL can be found in doc/GPL-license.txt in this distribution, or
16 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
17 *
18 * There are special exceptions to the terms and conditions of the GPL as
19 * it is applied to this Source Code. View the full text of the exception
20 * in the file doc/FLOSS-exception.txt in this software distribution, or
21 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
22 *
23 * By copying, modifying or distributing this software, you acknowledge
24 * that you have read and understood your obligations described above,
25 * and agree to abide by those obligations.
26 *
27 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29 * COMPLETENESS OR PERFORMANCE.
30 * $/LicenseInfo$
31 */
32
33#include "linden_common.h"
34#include "lldir.h"
35
36#include "audioengine_openal.h"
37#include "listener_openal.h"
38
39LLAudioEngine_OpenAL::LLAudioEngine_OpenAL()
40 :
41 mWindGen(NULL),
42 mWindBuf(NULL),
43 mWindBufFreq(0),
44 mWindBufSamples(0),
45 mWindBufBytes(0),
46 mWindSource(AL_NONE),
47 mNumEmptyWindALBuffers(MAX_NUM_WIND_BUFFERS)
48{
49}
50
51// virtual
52LLAudioEngine_OpenAL::~LLAudioEngine_OpenAL()
53{
54}
55
56// virtual
57bool LLAudioEngine_OpenAL::init(const S32 num_channels, void* userdata)
58{
59 mWindGen = NULL;
60 LLAudioEngine::init(num_channels, userdata);
61
62 if(!alutInit(NULL, NULL))
63 {
64 LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::init() ALUT initialization failed: " << alutGetErrorString (alutGetError ()) << LL_ENDL;
65 return false;
66 }
67
68 LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::init() OpenAL successfully initialized" << LL_ENDL;
69
70 LL_INFOS("OpenAL") << "OpenAL version: "
71 << ll_safe_string(alGetString(AL_VERSION)) << LL_ENDL;
72 LL_INFOS("OpenAL") << "OpenAL vendor: "
73 << ll_safe_string(alGetString(AL_VENDOR)) << LL_ENDL;
74 LL_INFOS("OpenAL") << "OpenAL renderer: "
75 << ll_safe_string(alGetString(AL_RENDERER)) << LL_ENDL;
76
77 ALint major = alutGetMajorVersion ();
78 ALint minor = alutGetMinorVersion ();
79 LL_INFOS("OpenAL") << "ALUT version: " << major << "." << minor << LL_ENDL;
80
81 ALCdevice *device = alcGetContextsDevice(alcGetCurrentContext());
82
83 alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &major);
84 alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &minor);
85 LL_INFOS("OpenAL") << "ALC version: " << major << "." << minor << LL_ENDL;
86
87 LL_INFOS("OpenAL") << "ALC default device: "
88 << ll_safe_string(alcGetString(device,
89 ALC_DEFAULT_DEVICE_SPECIFIER))
90 << LL_ENDL;
91
92 return true;
93}
94
95// virtual
96std::string LLAudioEngine_OpenAL::getDriverName(bool verbose)
97{
98 ALCdevice *device = alcGetContextsDevice(alcGetCurrentContext());
99 std::ostringstream version;
100
101 version <<
102 "OpenAL";
103
104 if (verbose)
105 {
106 version <<
107 ", version " <<
108 ll_safe_string(alGetString(AL_VERSION)) <<
109 " / " <<
110 ll_safe_string(alGetString(AL_VENDOR)) <<
111 " / " <<
112 ll_safe_string(alGetString(AL_RENDERER));
113
114 if (device)
115 version <<
116 ": " <<
117 ll_safe_string(alcGetString(device,
118 ALC_DEFAULT_DEVICE_SPECIFIER));
119 }
120
121 return version.str();
122}
123
124// virtual
125void LLAudioEngine_OpenAL::allocateListener()
126{
127 mListenerp = (LLListener *) new LLListener_OpenAL();
128 if(!mListenerp)
129 {
130 LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::allocateListener() Listener creation failed" << LL_ENDL;
131 }
132}
133
134// virtual
135void LLAudioEngine_OpenAL::shutdown()
136{
137 LL_INFOS("OpenAL") << "About to LLAudioEngine::shutdown()" << LL_ENDL;
138 LLAudioEngine::shutdown();
139
140 LL_INFOS("OpenAL") << "About to alutExit()" << LL_ENDL;
141 if(!alutExit())
142 {
143 LL_WARNS("OpenAL") << "Nuts." << LL_ENDL;
144 LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString (alutGetError ()) << LL_ENDL;
145 }
146
147 LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::shutdown() OpenAL successfully shut down" << LL_ENDL;
148
149 delete mListenerp;
150 mListenerp = NULL;
151}
152
153LLAudioBuffer *LLAudioEngine_OpenAL::createBuffer()
154{
155 return new LLAudioBufferOpenAL();
156}
157
158LLAudioChannel *LLAudioEngine_OpenAL::createChannel()
159{
160 return new LLAudioChannelOpenAL();
161}
162
163void LLAudioEngine_OpenAL::setInternalGain(F32 gain)
164{
165 //LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::setInternalGain() Gain: " << gain << LL_ENDL;
166 alListenerf(AL_GAIN, gain);
167}
168
169LLAudioChannelOpenAL::LLAudioChannelOpenAL()
170 :
171 mALSource(AL_NONE),
172 mLastSamplePos(0)
173{
174 alGenSources(1, &mALSource);
175}
176
177LLAudioChannelOpenAL::~LLAudioChannelOpenAL()
178{
179 cleanup();
180 alDeleteSources(1, &mALSource);
181}
182
183void LLAudioChannelOpenAL::cleanup()
184{
185 alSourceStop(mALSource);
186 mCurrentBufferp = NULL;
187}
188
189void LLAudioChannelOpenAL::play()
190{
191 if (mALSource == AL_NONE)
192 {
193 LL_WARNS("OpenAL") << "Playing without a mALSource, aborting" << LL_ENDL;
194 return;
195 }
196
197 if(!isPlaying())
198 {
199 alSourcePlay(mALSource);
200 getSource()->setPlayedOnce(true);
201 }
202}
203
204void LLAudioChannelOpenAL::playSynced(LLAudioChannel *channelp)
205{
206 if (channelp)
207 {
208 LLAudioChannelOpenAL *masterchannelp =
209 (LLAudioChannelOpenAL*)channelp;
210 if (mALSource != AL_NONE &&
211 masterchannelp->mALSource != AL_NONE)
212 {
213 // we have channels allocated to master and slave
214 ALfloat master_offset;
215 alGetSourcef(masterchannelp->mALSource, AL_SEC_OFFSET,
216 &master_offset);
217
218 LL_INFOS("OpenAL") << "Syncing with master at " << master_offset
219 << "sec" << LL_ENDL;
220 // *TODO: detect when this fails, maybe use AL_SAMPLE_
221 alSourcef(mALSource, AL_SEC_OFFSET, master_offset);
222 }
223 }
224 play();
225}
226
227bool LLAudioChannelOpenAL::isPlaying()
228{
229 if (mALSource != AL_NONE)
230 {
231 ALint state;
232 alGetSourcei(mALSource, AL_SOURCE_STATE, &state);
233 if(state == AL_PLAYING)
234 {
235 return true;
236 }
237 }
238
239 return false;
240}
241
242bool LLAudioChannelOpenAL::updateBuffer()
243{
244 if (LLAudioChannel::updateBuffer())
245 {
246 // Base class update returned true, which means that we need to actually
247 // set up the source for a different buffer.
248 LLAudioBufferOpenAL *bufferp = (LLAudioBufferOpenAL *)mCurrentSourcep->getCurrentBuffer();
249 ALuint buffer = bufferp->getBuffer();
250 alSourcei(mALSource, AL_BUFFER, buffer);
251 mLastSamplePos = 0;
252 }
253
254 if (mCurrentSourcep)
255 {
256 alSourcef(mALSource, AL_GAIN,
257 mCurrentSourcep->getGain() * getSecondaryGain());
258 alSourcei(mALSource, AL_LOOPING,
259 mCurrentSourcep->isLoop() ? AL_TRUE : AL_FALSE);
260 alSourcef(mALSource, AL_ROLLOFF_FACTOR,
261 gAudiop->mListenerp->getRolloffFactor());
262 alSourcef(mALSource, AL_REFERENCE_DISTANCE,
263 gAudiop->mListenerp->getDistanceFactor());
264 }
265
266 return true;
267}
268
269
270void LLAudioChannelOpenAL::updateLoop()
271{
272 if (mALSource == AL_NONE)
273 {
274 return;
275 }
276
277 // Hack: We keep track of whether we looped or not by seeing when the
278 // sample position looks like it's going backwards. Not reliable; may
279 // yield false negatives.
280 //
281 ALint cur_pos;
282 alGetSourcei(mALSource, AL_SAMPLE_OFFSET, &cur_pos);
283 if (cur_pos < mLastSamplePos)
284 {
285 mLoopedThisFrame = true;
286 }
287 mLastSamplePos = cur_pos;
288}
289
290
291void LLAudioChannelOpenAL::update3DPosition()
292{
293 if(!mCurrentSourcep)
294 {
295 return;
296 }
297 if (mCurrentSourcep->isAmbient())
298 {
299 alSource3f(mALSource, AL_POSITION, 0.0, 0.0, 0.0);
300 alSource3f(mALSource, AL_VELOCITY, 0.0, 0.0, 0.0);
301 //alSource3f(mALSource, AL_DIRECTION, 0.0, 0.0, 0.0);
302 alSourcei (mALSource, AL_SOURCE_RELATIVE, AL_TRUE);
303 } else {
304 LLVector3 float_pos;
305 float_pos.setVec(mCurrentSourcep->getPositionGlobal());
306 alSourcefv(mALSource, AL_POSITION, float_pos.mV);
307 alSourcefv(mALSource, AL_VELOCITY, mCurrentSourcep->getVelocity().mV);
308 //alSource3f(mALSource, AL_DIRECTION, 0.0, 0.0, 0.0);
309 alSourcei (mALSource, AL_SOURCE_RELATIVE, AL_FALSE);
310 }
311
312 alSourcef(mALSource, AL_GAIN, mCurrentSourcep->getGain() * getSecondaryGain());
313}
314
315LLAudioBufferOpenAL::LLAudioBufferOpenAL()
316{
317 mALBuffer = AL_NONE;
318}
319
320LLAudioBufferOpenAL::~LLAudioBufferOpenAL()
321{
322 cleanup();
323}
324
325void LLAudioBufferOpenAL::cleanup()
326{
327 if(mALBuffer != AL_NONE)
328 {
329 alDeleteBuffers(1, &mALBuffer);
330 mALBuffer = AL_NONE;
331 }
332}
333
334bool LLAudioBufferOpenAL::loadWAV(const std::string& filename)
335{
336 cleanup();
337 mALBuffer = alutCreateBufferFromFile(filename.c_str());
338 if(mALBuffer == AL_NONE)
339 {
340 ALenum error = alutGetError();
341 if (gDirUtilp->fileExists(filename))
342 {
343 LL_WARNS("OpenAL") <<
344 "LLAudioBufferOpenAL::loadWAV() Error loading "
345 << filename
346 << " " << alutGetErrorString(error) << LL_ENDL;
347 }
348 else
349 {
350 // It's common for the file to not actually exist.
351 LL_DEBUGS("OpenAL") <<
352 "LLAudioBufferOpenAL::loadWAV() Error loading "
353 << filename
354 << " " << alutGetErrorString(error) << LL_ENDL;
355 }
356 return false;
357 }
358
359 return true;
360}
361
362U32 LLAudioBufferOpenAL::getLength()
363{
364 if(mALBuffer == AL_NONE)
365 {
366 return 0;
367 }
368 ALint length;
369 alGetBufferi(mALBuffer, AL_SIZE, &length);
370 return length >> 2;
371}
372
373// ------------
374
375void LLAudioEngine_OpenAL::initWind()
376{
377 ALenum error;
378 LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::initWind() start" << LL_ENDL;
379
380 mNumEmptyWindALBuffers = MAX_NUM_WIND_BUFFERS;
381
382 alGetError(); /* clear error */
383
384 alGenSources(1,&mWindSource);
385
386 if((error=alGetError()) != AL_NO_ERROR)
387 {
388 LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::initWind() Error creating wind sources: "<<error<<LL_ENDL;
389 }
390
391 mWindGen = new LLWindGen<WIND_SAMPLE_T>;
392 const float WIND_BUFFER_SIZE_SEC = 0.05f; // 1/20th sec
393
394 mWindBufFreq = mWindGen->getInputSamplingRate();
395 mWindBufSamples = llceil(mWindBufFreq * WIND_BUFFER_SIZE_SEC);
396 mWindBufBytes = mWindBufSamples * 2 /*stereo*/ * sizeof(WIND_SAMPLE_T);
397
398 mWindBuf = new WIND_SAMPLE_T [mWindBufSamples * 2 /*stereo*/];
399
400 if(mWindBuf==NULL)
401 {
402 LL_ERRS("OpenAL") << "LLAudioEngine_OpenAL::initWind() Error creating wind memory buffer" << LL_ENDL;
403 mEnableWind=false;
404 }
405
406 LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::initWind() done" << LL_ENDL;
407}
408
409void LLAudioEngine_OpenAL::cleanupWind()
410{
411 LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::cleanupWind()" << LL_ENDL;
412
413 if (mWindSource != AL_NONE)
414 {
415 // detach and delete all outstanding buffers on the wind source
416 alSourceStop(mWindSource);
417 int processed;
418 alGetSourcei(mWindSource, AL_BUFFERS_PROCESSED, &processed);
419 while (processed--)
420 {
421 ALuint buffer = AL_NONE;
422 alSourceUnqueueBuffers(mWindSource, 1, &buffer);
423 alDeleteBuffers(1, &buffer);
424 }
425
426 // delete the wind source itself
427 alDeleteSources(1, &mWindSource);
428
429 mWindSource = AL_NONE;
430 }
431
432 delete[] mWindBuf;
433 mWindBuf = NULL;
434
435 delete mWindGen;
436 mWindGen = NULL;
437}
438
439void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
440{
441 LLVector3 wind_pos;
442 F64 pitch;
443 F64 center_freq;
444 ALenum error;
445
446 if (!mEnableWind)
447 return;
448
449 if(!mWindBuf)
450 return;
451
452 if (mWindUpdateTimer.checkExpirationAndReset(LL_WIND_UPDATE_INTERVAL))
453 {
454
455 // wind comes in as Linden coordinate (+X = forward, +Y = left, +Z = up)
456 // need to convert this to the conventional orientation DS3D and OpenAL use
457 // where +X = right, +Y = up, +Z = backwards
458
459 wind_vec.setVec(-wind_vec.mV[1], wind_vec.mV[2], -wind_vec.mV[0]);
460
461 pitch = 1.0 + mapWindVecToPitch(wind_vec);
462 center_freq = 80.0 * pow(pitch,2.5*(mapWindVecToGain(wind_vec)+1.0));
463
464 mWindGen->mTargetFreq = (F32)center_freq;
465 mWindGen->mTargetGain = (F32)mapWindVecToGain(wind_vec) * mMaxWindGain;
466 mWindGen->mTargetPanGainR = (F32)mapWindVecToPan(wind_vec);
467
468 alSourcei(mWindSource, AL_LOOPING, AL_FALSE);
469 alSource3f(mWindSource, AL_POSITION, 0.0, 0.0, 0.0);
470 alSource3f(mWindSource, AL_VELOCITY, 0.0, 0.0, 0.0);
471 alSourcef(mWindSource, AL_ROLLOFF_FACTOR, 0.0);
472 alSourcei(mWindSource, AL_SOURCE_RELATIVE, AL_TRUE);
473 }
474
475 // ok lets make a wind buffer now
476
477 int processed, queued, unprocessed;
478 alGetSourcei(mWindSource, AL_BUFFERS_PROCESSED, &processed);
479 alGetSourcei(mWindSource, AL_BUFFERS_QUEUED, &queued);
480 unprocessed = queued - processed;
481
482 // ensure that there are always at least 3x as many filled buffers
483 // queued as we managed to empty since last time.
484 mNumEmptyWindALBuffers = llmin(mNumEmptyWindALBuffers + processed * 3 - unprocessed, MAX_NUM_WIND_BUFFERS-unprocessed);
485 mNumEmptyWindALBuffers = llmax(mNumEmptyWindALBuffers, 0);
486
487 //LL_INFOS("OpenAL") << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << LL_ENDL;
488
489 while(processed--) // unqueue old buffers
490 {
491 ALuint buffer;
492 int error;
493 alGetError(); /* clear error */
494 alSourceUnqueueBuffers(mWindSource, 1, &buffer);
495 error = alGetError();
496 if(error != AL_NO_ERROR)
497 {
498 LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << LL_ENDL;
499 }
500 else
501 {
502 alDeleteBuffers(1, &buffer);
503 }
504 }
505
506 unprocessed += mNumEmptyWindALBuffers;
507 while (mNumEmptyWindALBuffers > 0) // fill+queue new buffers
508 {
509 ALuint buffer;
510 alGetError(); /* clear error */
511 alGenBuffers(1,&buffer);
512 if((error=alGetError()) != AL_NO_ERROR)
513 {
514 LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::initWind() Error creating wind buffer: " << error << LL_ENDL;
515 break;
516 }
517
518 alBufferData(buffer,
519 AL_FORMAT_STEREO16,
520 mWindGen->windGenerate(mWindBuf,
521 mWindBufSamples, 2),
522 mWindBufBytes,
523 mWindBufFreq);
524 error = alGetError();
525 if(error != AL_NO_ERROR)
526 LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << LL_ENDL;
527
528 alSourceQueueBuffers(mWindSource, 1, &buffer);
529 error = alGetError();
530 if(error != AL_NO_ERROR)
531 LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << LL_ENDL;
532
533 --mNumEmptyWindALBuffers;
534 }
535
536 int playing;
537 alGetSourcei(mWindSource, AL_SOURCE_STATE, &playing);
538 if(playing != AL_PLAYING)
539 {
540 alSourcePlay(mWindSource);
541
542 LL_INFOS("OpenAL") << "Wind had stopped - probably ran out of buffers - restarting: " << (unprocessed+mNumEmptyWindALBuffers) << " now queued." << LL_ENDL;
543 }
544}
diff --git a/linden/indra/llaudio/audioengine_openal.h b/linden/indra/llaudio/audioengine_openal.h
new file mode 100644
index 0000000..1f6dee4
--- /dev/null
+++ b/linden/indra/llaudio/audioengine_openal.h
@@ -0,0 +1,112 @@
1/**
2 * @file audioengine_openal.cpp
3 * @brief implementation of audio engine using OpenAL
4 * support as a OpenAL 3D implementation
5 *
6 *
7 * $LicenseInfo:firstyear=2002&license=viewergpl$
8 *
9 * Copyright (c) 2002-2008, Linden Research, Inc.
10 *
11 * Second Life Viewer Source Code
12 * The source code in this file ("Source Code") is provided by Linden Lab
13 * to you under the terms of the GNU General Public License, version 2.0
14 * ("GPL"), unless you have obtained a separate licensing agreement
15 * ("Other License"), formally executed by you and Linden Lab. Terms of
16 * the GPL can be found in doc/GPL-license.txt in this distribution, or
17 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
18 *
19 * There are special exceptions to the terms and conditions of the GPL as
20 * it is applied to this Source Code. View the full text of the exception
21 * in the file doc/FLOSS-exception.txt in this software distribution, or
22 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
23 *
24 * By copying, modifying or distributing this software, you acknowledge
25 * that you have read and understood your obligations described above,
26 * and agree to abide by those obligations.
27 *
28 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
29 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
30 * COMPLETENESS OR PERFORMANCE.
31 * $/LicenseInfo$
32 */
33
34
35#ifndef LL_AUDIOENGINE_OPENAL_H
36#define LL_AUDIOENGINE_OPENAL_H
37
38#include "audioengine.h"
39#include "listener_openal.h"
40#include "windgen.h"
41
42class LLAudioEngine_OpenAL : public LLAudioEngine
43{
44 public:
45 LLAudioEngine_OpenAL();
46 virtual ~LLAudioEngine_OpenAL();
47
48 virtual bool init(const S32 num_channels, void *user_data);
49 virtual std::string getDriverName(bool verbose);
50 virtual void allocateListener();
51
52 virtual void shutdown();
53
54 void setInternalGain(F32 gain);
55
56 LLAudioBuffer* createBuffer();
57 LLAudioChannel* createChannel();
58
59 /*virtual*/ void initWind();
60 /*virtual*/ void cleanupWind();
61 /*virtual*/ void updateWind(LLVector3 direction, F32 camera_altitude);
62
63 private:
64 void * windDSP(void *newbuffer, int length);
65 typedef S16 WIND_SAMPLE_T;
66 LLWindGen<WIND_SAMPLE_T> *mWindGen;
67 S16 *mWindBuf;
68 U32 mWindBufFreq;
69 U32 mWindBufSamples;
70 U32 mWindBufBytes;
71 ALuint mWindSource;
72 int mNumEmptyWindALBuffers;
73
74 static const int MAX_NUM_WIND_BUFFERS = 80;
75};
76
77class LLAudioChannelOpenAL : public LLAudioChannel
78{
79 public:
80 LLAudioChannelOpenAL();
81 virtual ~LLAudioChannelOpenAL();
82 protected:
83 /*virtual*/ void play();
84 /*virtual*/ void playSynced(LLAudioChannel *channelp);
85 /*virtual*/ void cleanup();
86 /*virtual*/ bool isPlaying();
87
88 /*virtual*/ bool updateBuffer();
89 /*virtual*/ void update3DPosition();
90 /*virtual*/ void updateLoop();
91
92 ALuint mALSource;
93 ALint mLastSamplePos;
94};
95
96class LLAudioBufferOpenAL : public LLAudioBuffer{
97 public:
98 LLAudioBufferOpenAL();
99 virtual ~LLAudioBufferOpenAL();
100
101 bool loadWAV(const std::string& filename);
102 U32 getLength();
103
104 friend class LLAudioChannelOpenAL;
105 protected:
106 void cleanup();
107 ALuint getBuffer() {return mALBuffer;}
108
109 ALuint mALBuffer;
110};
111
112#endif
diff --git a/linden/indra/llaudio/listener_fmod.h b/linden/indra/llaudio/listener_fmod.h
index 7b7c4c6..95b31ac 100644
--- a/linden/indra/llaudio/listener_fmod.h
+++ b/linden/indra/llaudio/listener_fmod.h
@@ -37,11 +37,6 @@
37 37
38class LLListener_FMOD : public LLListener 38class LLListener_FMOD : public LLListener
39{ 39{
40 protected:
41 F32 mDopplerFactor;
42 F32 mDistanceFactor;
43 F32 mRolloffFactor;
44
45 public: 40 public:
46 LLListener_FMOD(); 41 LLListener_FMOD();
47 virtual ~LLListener_FMOD(); 42 virtual ~LLListener_FMOD();
@@ -59,6 +54,11 @@ class LLListener_FMOD : public LLListener
59 virtual F32 getDistanceFactor(); 54 virtual F32 getDistanceFactor();
60 virtual void setRolloffFactor(F32 factor); 55 virtual void setRolloffFactor(F32 factor);
61 virtual F32 getRolloffFactor(); 56 virtual F32 getRolloffFactor();
57
58 protected:
59 F32 mDopplerFactor;
60 F32 mDistanceFactor;
61 F32 mRolloffFactor;
62}; 62};
63 63
64#endif 64#endif
diff --git a/linden/indra/llaudio/listener_openal.cpp b/linden/indra/llaudio/listener_openal.cpp
new file mode 100644
index 0000000..637af30
--- /dev/null
+++ b/linden/indra/llaudio/listener_openal.cpp
@@ -0,0 +1,98 @@
1/**
2 * @file audioengine_openal.cpp
3 * @brief implementation of audio engine using OpenAL
4 * support as a OpenAL 3D implementation
5 *
6 * $LicenseInfo:firstyear=2002&license=viewergpl$
7 *
8 * Copyright (c) 2002-2007, Linden Research, Inc.
9 *
10 * Second Life Viewer Source Code
11 * The source code in this file ("Source Code") is provided by Linden Lab
12 * to you under the terms of the GNU General Public License, version 2.0
13 * ("GPL"), unless you have obtained a separate licensing agreement
14 * ("Other License"), formally executed by you and Linden Lab. Terms of
15 * the GPL can be found in doc/GPL-license.txt in this distribution, or
16 * online at http://secondlife.com/developers/opensource/gplv2
17 *
18 * There are special exceptions to the terms and conditions of the GPL as
19 * it is applied to this Source Code. View the full text of the exception
20 * in the file doc/FLOSS-exception.txt in this software distribution, or
21 * online at http://secondlife.com/developers/opensource/flossexception
22 *
23 * By copying, modifying or distributing this software, you acknowledge
24 * that you have read and understood your obligations described above,
25 * and agree to abide by those obligations.
26 *
27 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29 * COMPLETENESS OR PERFORMANCE.
30 * $/LicenseInfo$
31 */
32
33#include "linden_common.h"
34#include "audioengine.h"
35
36#include "listener_openal.h"
37
38LLListener_OpenAL::LLListener_OpenAL(){
39 init();
40}
41
42LLListener_OpenAL::~LLListener_OpenAL(){
43}
44
45void LLListener_OpenAL::translate(LLVector3 offset){
46 LLListener::translate(offset);
47 llinfos << "LLListener_OpenAL::translate() : " << offset << llendl;
48}
49
50void LLListener_OpenAL::setPosition(LLVector3 pos){
51 LLListener::setPosition(pos);
52 //llinfos << "LLListener_OpenAL::setPosition() : " << pos << llendl;
53}
54
55void LLListener_OpenAL::setVelocity(LLVector3 vel){
56 LLListener::setVelocity(vel);
57}
58
59void LLListener_OpenAL::orient(LLVector3 up, LLVector3 at){
60 LLListener::orient(up, at);
61 //llinfos << "LLListener_OpenAL::orient() up: " << up << " at: " << at << llendl;
62}
63
64void LLListener_OpenAL::commitDeferredChanges(){
65 ALfloat orientation[6];
66 orientation[0] = mListenAt.mV[0];
67 orientation[1] = mListenAt.mV[1];
68 orientation[2] = mListenAt.mV[2];
69 orientation[3] = mListenUp.mV[0];
70 orientation[4] = mListenUp.mV[1];
71 orientation[5] = mListenUp.mV[2];
72
73 ALfloat velocity[3];
74 velocity[0] = mVelocity.mV[0];
75 velocity[1] = mVelocity.mV[1];
76 velocity[2] = mVelocity.mV[2];
77
78 alListenerfv(AL_ORIENTATION, orientation);
79 alListenerfv(AL_POSITION, mPosition.mV);
80 alListenerfv(AL_VELOCITY, velocity);
81}
82
83void LLListener_OpenAL::setDopplerFactor(F32 factor){
84 // Effect is way too strong by default, scale it down here.
85 // Scaling the speed of sound up causes crashes.
86 factor *= 0.005f;
87 //llinfos << "LLListener_OpenAL::setDopplerFactor() : " << factor << llendl;
88 alDopplerFactor(factor);
89}
90
91F32 LLListener_OpenAL::getDopplerFactor(){
92 ALfloat factor;
93 factor = 0.0f;
94 alDopplerFactor(factor);
95 llinfos << "LLListener_OpenAL::getDopplerFactor() : " << factor << llendl;
96 return factor;
97}
98
diff --git a/linden/indra/llaudio/listener_openal.h b/linden/indra/llaudio/listener_openal.h
index cc4bb9e..7551161 100644
--- a/linden/indra/llaudio/listener_openal.h
+++ b/linden/indra/llaudio/listener_openal.h
@@ -35,7 +35,8 @@
35 35
36#include "listener.h" 36#include "listener.h"
37 37
38#include "AL/al.h" 38
39//#include "AL/al.h"
39#include "AL/alut.h" 40#include "AL/alut.h"
40 41
41class LLListener_OpenAL : public LLListener 42class LLListener_OpenAL : public LLListener
@@ -54,6 +55,10 @@ class LLListener_OpenAL : public LLListener
54 virtual void setPosition(LLVector3 pos); 55 virtual void setPosition(LLVector3 pos);
55 virtual void setVelocity(LLVector3 vel); 56 virtual void setVelocity(LLVector3 vel);
56 virtual void orient(LLVector3 up, LLVector3 at); 57 virtual void orient(LLVector3 up, LLVector3 at);
58 virtual void commitDeferredChanges();
59
60 virtual void setDopplerFactor(F32 factor);
61 virtual F32 getDopplerFactor();
57}; 62};
58 63
59#endif 64#endif
diff --git a/linden/indra/llaudio/llaudiodecodemgr.cpp b/linden/indra/llaudio/llaudiodecodemgr.cpp
index 7cd48a9..cfd0500 100644
--- a/linden/indra/llaudio/llaudiodecodemgr.cpp
+++ b/linden/indra/llaudio/llaudiodecodemgr.cpp
@@ -374,16 +374,16 @@ BOOL LLVorbisDecodeState::finishDecode()
374 374
375 // write "data" chunk length, in little-endian format 375 // write "data" chunk length, in little-endian format
376 S32 data_length = mWAVBuffer.size() - WAV_HEADER_SIZE; 376 S32 data_length = mWAVBuffer.size() - WAV_HEADER_SIZE;
377 mWAVBuffer[40] = (data_length) & 0x000000FF; 377 mWAVBuffer[40] = (data_length - 8) & 0x000000FF;
378 mWAVBuffer[41] = (data_length >> 8) & 0x000000FF; 378 mWAVBuffer[41] = ((data_length - 8)>> 8) & 0x000000FF;
379 mWAVBuffer[42] = (data_length >> 16) & 0x000000FF; 379 mWAVBuffer[42] = ((data_length - 8)>> 16) & 0x000000FF;
380 mWAVBuffer[43] = (data_length >> 24) & 0x000000FF; 380 mWAVBuffer[43] = ((data_length - 8)>> 24) & 0x000000FF;
381
381 // write overall "RIFF" length, in little-endian format 382 // write overall "RIFF" length, in little-endian format
382 data_length += 36; 383 mWAVBuffer[4] = (data_length + 28) & 0x000000FF;
383 mWAVBuffer[4] = (data_length) & 0x000000FF; 384 mWAVBuffer[5] = ((data_length + 28) >> 8) & 0x000000FF;
384 mWAVBuffer[5] = (data_length >> 8) & 0x000000FF; 385 mWAVBuffer[6] = ((data_length + 28) >> 16) & 0x000000FF;
385 mWAVBuffer[6] = (data_length >> 16) & 0x000000FF; 386 mWAVBuffer[7] = ((data_length + 28) >> 24) & 0x000000FF;
386 mWAVBuffer[7] = (data_length >> 24) & 0x000000FF;
387 387
388 // 388 //
389 // FUDGECAKES!!! Vorbis encode/decode messes up loop point transitions (pop) 389 // FUDGECAKES!!! Vorbis encode/decode messes up loop point transitions (pop)
@@ -395,7 +395,8 @@ BOOL LLVorbisDecodeState::finishDecode()
395 S32 fade_length; 395 S32 fade_length;
396 char pcmout[4096]; /*Flawfinder: ignore*/ 396 char pcmout[4096]; /*Flawfinder: ignore*/
397 397
398 fade_length = llmin((S32)128,(S32)(data_length-36)/8); 398 fade_length = llmin((S32)128,(S32)(data_length)/8);
399
399 if((S32)mWAVBuffer.size() >= (WAV_HEADER_SIZE + 2* fade_length)) 400 if((S32)mWAVBuffer.size() >= (WAV_HEADER_SIZE + 2* fade_length))
400 { 401 {
401 memcpy(pcmout, &mWAVBuffer[WAV_HEADER_SIZE], (2 * fade_length)); /*Flawfinder: ignore*/ 402 memcpy(pcmout, &mWAVBuffer[WAV_HEADER_SIZE], (2 * fade_length)); /*Flawfinder: ignore*/
@@ -435,7 +436,7 @@ BOOL LLVorbisDecodeState::finishDecode()
435 } 436 }
436 } 437 }
437 438
438 if (36 == data_length) 439 if (0 == data_length)
439 { 440 {
440 llwarns << "BAD Vorbis decode in finishDecode!" << llendl; 441 llwarns << "BAD Vorbis decode in finishDecode!" << llendl;
441 mValid = FALSE; 442 mValid = FALSE;
diff --git a/linden/indra/llaudio/windgen.h b/linden/indra/llaudio/windgen.h
new file mode 100644
index 0000000..39ce568
--- /dev/null
+++ b/linden/indra/llaudio/windgen.h
@@ -0,0 +1,138 @@
1/**
2 * @file windgen.h
3 * @brief Templated wind noise generation
4 *
5 * $LicenseInfo:firstyear=2002&license=viewergpl$
6 *
7 * Copyright (c) 2002-2008, Linden Research, Inc.
8 *
9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0
12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlife.com/developers/opensource/gplv2
16 *
17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlife.com/developers/opensource/flossexception
21 *
22 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above,
24 * and agree to abide by those obligations.
25 *
26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
30 */
31#ifndef WINDGEN_H
32#define WINDGEN_H
33
34#include "llcommon.h"
35#include "llrand.h"
36
37template <class MIXBUFFERFORMAT_T>
38class LLWindGen
39{
40public:
41 LLWindGen() :
42 mTargetGain(0.f),
43 mTargetFreq(100.f),
44 mTargetPanGainR(0.5f),
45 mbuf0(0.0),
46 mbuf1(0.0),
47 mbuf2(0.0),
48 mbuf3(0.0),
49 mbuf4(0.0),
50 mbuf5(0.0),
51 mY0(0.0),
52 mY1(0.0),
53 mCurrentGain(0.f),
54 mCurrentFreq(100.f),
55 mCurrentPanGainR(0.5f) {};
56
57 static const U32 getInputSamplingRate() {return mInputSamplingRate;}
58
59 // newbuffer = the buffer passed from the previous DSP unit.
60 // numsamples = length in samples-per-channel at this mix time.
61 // stride = number of bytes between start of each sample.
62 // NOTE: generates L/R interleaved stereo
63 MIXBUFFERFORMAT_T* windGenerate(MIXBUFFERFORMAT_T *newbuffer, int numsamples, int stride)
64 {
65 U8 *cursamplep = (U8*)newbuffer;
66
67 double bandwidth = 50.0F;
68 double a0,b1,b2;
69
70 // calculate resonant filter coeffs
71 b2 = exp(-(F_TWO_PI) * (bandwidth / mInputSamplingRate));
72
73 while (numsamples--)
74 {
75 mCurrentFreq = (float)((0.999 * mCurrentFreq) + (0.001 * mTargetFreq));
76 mCurrentGain = (float)((0.999 * mCurrentGain) + (0.001 * mTargetGain));
77 mCurrentPanGainR = (float)((0.999 * mCurrentPanGainR) + (0.001 * mTargetPanGainR));
78 b1 = (-4.0 * b2) / (1.0 + b2) * cos(F_TWO_PI * (mCurrentFreq / mInputSamplingRate));
79 a0 = (1.0 - b2) * sqrt(1.0 - (b1 * b1) / (4.0 * b2));
80 double nextSample;
81
82 // start with white noise
83 nextSample = ll_frand(2.0f) - 1.0f;
84
85#if 1 // LLAE_WIND_PINK apply pinking filter
86 mbuf0 = 0.997f * mbuf0 + 0.0126502f * nextSample;
87 mbuf1 = 0.985f * mbuf1 + 0.0139083f * nextSample;
88 mbuf2 = 0.950f * mbuf2 + 0.0205439f * nextSample;
89 mbuf3 = 0.850f * mbuf3 + 0.0387225f * nextSample;
90 mbuf4 = 0.620f * mbuf4 + 0.0465932f * nextSample;
91 mbuf5 = 0.250f * mbuf5 + 0.1093477f * nextSample;
92
93 nextSample = mbuf0 + mbuf1 + mbuf2 + mbuf3 + mbuf4 + mbuf5;
94#endif
95
96#if 1 //LLAE_WIND_RESONANT // do a resonant filter on the noise
97 nextSample = (double)( a0 * nextSample - b1 * mY0 - b2 * mY1 );
98
99 mY1 = mY0;
100 mY0 = nextSample;
101#endif
102
103 nextSample *= mCurrentGain;
104
105 MIXBUFFERFORMAT_T sample;
106
107 sample = llfloor(((F32)nextSample*32768.f*(1.0f - mCurrentPanGainR))+0.5f);
108 *(MIXBUFFERFORMAT_T*)cursamplep = llclamp(sample, (MIXBUFFERFORMAT_T)-32768, (MIXBUFFERFORMAT_T)32767);
109 cursamplep += stride;
110
111 sample = llfloor(((F32)nextSample*32768.f*mCurrentPanGainR)+0.5f);
112 *(MIXBUFFERFORMAT_T*)cursamplep = llclamp(sample, (MIXBUFFERFORMAT_T)-32768, (MIXBUFFERFORMAT_T)32767);
113 cursamplep += stride;
114 }
115
116 return newbuffer;
117 }
118
119 F32 mTargetGain;
120 F32 mTargetFreq;
121 F32 mTargetPanGainR;
122
123private:
124 static const U32 mInputSamplingRate = 44100;
125 F64 mbuf0;
126 F64 mbuf1;
127 F64 mbuf2;
128 F64 mbuf3;
129 F64 mbuf4;
130 F64 mbuf5;
131 F64 mY0;
132 F64 mY1;
133 F32 mCurrentGain;
134 F32 mCurrentFreq;
135 F32 mCurrentPanGainR;
136};
137
138#endif
diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h
index 4032c5b..4b99b71 100644
--- a/linden/indra/llcommon/llversionviewer.h
+++ b/linden/indra/llcommon/llversionviewer.h
@@ -45,6 +45,6 @@ const char * const IMP_VIEWER_NAME = "Imprudence";
45const S32 IMP_VERSION_MAJOR = 1; 45const S32 IMP_VERSION_MAJOR = 1;
46const S32 IMP_VERSION_MINOR = 1; 46const S32 IMP_VERSION_MINOR = 1;
47const S32 IMP_VERSION_PATCH = 0; 47const S32 IMP_VERSION_PATCH = 0;
48const char * const IMP_VERSION_TEST = "alpha"; 48const char * const IMP_VERSION_TEST = "RC1";
49 49
50#endif 50#endif
diff --git a/linden/indra/llmath/CMakeLists.txt b/linden/indra/llmath/CMakeLists.txt
index 6a329fa..e5ec3e1 100644
--- a/linden/indra/llmath/CMakeLists.txt
+++ b/linden/indra/llmath/CMakeLists.txt
@@ -11,6 +11,8 @@ include_directories(
11 11
12set(llmath_SOURCE_FILES 12set(llmath_SOURCE_FILES
13 llbboxlocal.cpp 13 llbboxlocal.cpp
14 llcalc.cpp
15 llcalcparser.cpp
14 llcamera.cpp 16 llcamera.cpp
15 llcoordframe.cpp 17 llcoordframe.cpp
16 llline.cpp 18 llline.cpp
@@ -40,6 +42,8 @@ set(llmath_HEADER_FILES
40 camera.h 42 camera.h
41 coordframe.h 43 coordframe.h
42 llbboxlocal.h 44 llbboxlocal.h
45 llcalc.h
46 llcalcparser.h
43 llcamera.h 47 llcamera.h
44 llcoord.h 48 llcoord.h
45 llcoordframe.h 49 llcoordframe.h
diff --git a/linden/indra/llmath/llcalc.cpp b/linden/indra/llmath/llcalc.cpp
new file mode 100644
index 0000000..ff3f91f
--- /dev/null
+++ b/linden/indra/llmath/llcalc.cpp
@@ -0,0 +1,155 @@
1/*
2 * LLCalc.cpp
3 * SecondLife
4 *
5 * Created by Aimee Walton on 28/09/2008.
6 * Copyright 2008 Aimee Walton.
7 *
8 */
9
10#include "linden_common.h"
11
12#include "llcalc.h"
13
14#include <boost/spirit/core.hpp>
15#include <boost/spirit/error_handling.hpp>
16
17#include "llcalcparser.h"
18#include "llmath.h"
19
20
21// Variable names for use in the build floater
22const char* LLCalc::X_POS = "XP";
23const char* LLCalc::Y_POS = "YP";
24const char* LLCalc::Z_POS = "ZP";
25const char* LLCalc::X_SCALE = "XS";
26const char* LLCalc::Y_SCALE = "YS";
27const char* LLCalc::Z_SCALE = "ZS";
28const char* LLCalc::X_ROT = "XR";
29const char* LLCalc::Y_ROT = "YR";
30const char* LLCalc::Z_ROT = "ZR";
31const char* LLCalc::HOLLOW = "HLW";
32const char* LLCalc::CUT_BEGIN = "CB";
33const char* LLCalc::CUT_END = "CE";
34const char* LLCalc::PATH_BEGIN = "PB";
35const char* LLCalc::PATH_END = "PE";
36const char* LLCalc::TWIST_BEGIN = "TB";
37const char* LLCalc::TWIST_END = "TE";
38const char* LLCalc::X_SHEAR = "XSH";
39const char* LLCalc::Y_SHEAR = "YSH";
40const char* LLCalc::X_TAPER = "XTP";
41const char* LLCalc::Y_TAPER = "YTP";
42const char* LLCalc::RADIUS_OFFSET = "ROF";
43const char* LLCalc::REVOLUTIONS = "REV";
44const char* LLCalc::SKEW = "SKW";
45const char* LLCalc::X_HOLE = "XHL";
46const char* LLCalc::Y_HOLE = "YHL";
47const char* LLCalc::TEX_U_SCALE = "TSU";
48const char* LLCalc::TEX_V_SCALE = "TSV";
49const char* LLCalc::TEX_U_OFFSET = "TOU";
50const char* LLCalc::TEX_V_OFFSET = "TOV";
51const char* LLCalc::TEX_ROTATION = "TROT";
52const char* LLCalc::TEX_TRANSPARENCY = "TRNS";
53const char* LLCalc::TEX_GLOW = "GLOW";
54
55
56LLCalc* LLCalc::sInstance = NULL;
57
58LLCalc::LLCalc() : mLastErrorPos(0)
59{
60// mUserVariables = new calc_map_t;
61 mVariables = new calc_map_t;
62 mConstants = new calc_map_t;
63
64 // Init table of constants
65 (*mConstants)["PI"] = F_PI;
66 (*mConstants)["TWO_PI"] = F_TWO_PI;
67 (*mConstants)["PI_BY_TWO"] = F_PI_BY_TWO;
68 (*mConstants)["SQRT2"] = F_SQRT2;
69 (*mConstants)["DEG_TO_RAD"] = DEG_TO_RAD;
70 (*mConstants)["RAD_TO_DEG"] = RAD_TO_DEG;
71 (*mConstants)["GRAVITY"] = GRAVITY;
72}
73
74LLCalc::~LLCalc()
75{
76 delete mConstants;
77 delete mVariables;
78// delete mUserVariables;
79}
80
81//static
82void LLCalc::cleanUp()
83{
84 delete sInstance;
85 sInstance = NULL;
86}
87
88//static
89LLCalc* LLCalc::getInstance()
90{
91 if (!sInstance) sInstance = new LLCalc();
92 return sInstance;
93}
94
95void LLCalc::setVar(const std::string& name, const F32& value)
96{
97 (*mVariables)[name] = value;
98}
99
100void LLCalc::clearVar(const std::string& name)
101{
102 mVariables->erase(name);
103}
104
105void LLCalc::clearAllVariables()
106{
107 mVariables->clear();
108}
109
110/*
111void LLCalc::updateVariables(LLSD& vars)
112{
113 LLSD::map_iterator cIt = vars.beginMap();
114 for(; cIt != vars.endMap(); cIt++)
115 {
116 setVar(cIt->first, (F32)(LLSD::Real)cIt->second);
117 }
118}
119*/
120
121bool LLCalc::evalString(const std::string& expression, F32& result)
122{
123 using namespace boost::spirit;
124
125 std::string expr_upper = expression;
126 LLStringUtil::toUpper(expr_upper);
127
128 LLCalcParser calc(result, mConstants, mVariables);
129
130 mLastErrorPos = 0;
131 std::string::iterator start = expr_upper.begin();
132 parse_info<std::string::iterator> info;
133
134 try
135 {
136 info = parse(start, expr_upper.end(), calc, space_p);
137 lldebugs << "Math expression: " << expression << " = " << result << llendl;
138 }
139 catch(parser_error<std::string, std::string::iterator> &e)
140 {
141 mLastErrorPos = e.where - expr_upper.begin();
142
143 llinfos << "Calc parser exception: " << e.descriptor << " at " << mLastErrorPos << " in expression: " << expression << llendl;
144 return false;
145 }
146
147 if (!info.full)
148 {
149 mLastErrorPos = info.stop - expr_upper.begin();
150 llinfos << "Unhandled syntax error at " << mLastErrorPos << " in expression: " << expression << llendl;
151 return false;
152 }
153
154 return true;
155}
diff --git a/linden/indra/llmath/llcalc.h b/linden/indra/llmath/llcalc.h
new file mode 100644
index 0000000..a376895
--- /dev/null
+++ b/linden/indra/llmath/llcalc.h
@@ -0,0 +1,85 @@
1/*
2 * LLCalc.h
3 * SecondLife
4 *
5 * Created by Aimee Walton on 28/09/2008.
6 * Copyright 2008 Aimee Walton.
7 *
8 */
9
10#ifndef LL_CALC_H
11#define LL_CALC_H
12
13#include <map>
14#include <string>
15
16//#include "llsd.h"
17
18class LLCalc
19{
20public:
21 LLCalc();
22 ~LLCalc();
23
24 // Variable name constants
25 static const char* X_POS;
26 static const char* Y_POS;
27 static const char* Z_POS;
28 static const char* X_SCALE;
29 static const char* Y_SCALE;
30 static const char* Z_SCALE;
31 static const char* X_ROT;
32 static const char* Y_ROT;
33 static const char* Z_ROT;
34 static const char* HOLLOW;
35 static const char* CUT_BEGIN;
36 static const char* CUT_END;
37 static const char* PATH_BEGIN;
38 static const char* PATH_END;
39 static const char* TWIST_BEGIN;
40 static const char* TWIST_END;
41 static const char* X_SHEAR;
42 static const char* Y_SHEAR;
43 static const char* X_TAPER;
44 static const char* Y_TAPER;
45 static const char* RADIUS_OFFSET;
46 static const char* REVOLUTIONS;
47 static const char* SKEW;
48 static const char* X_HOLE;
49 static const char* Y_HOLE;
50 static const char* TEX_U_SCALE;
51 static const char* TEX_V_SCALE;
52 static const char* TEX_U_OFFSET;
53 static const char* TEX_V_OFFSET;
54 static const char* TEX_ROTATION;
55 static const char* TEX_TRANSPARENCY;
56 static const char* TEX_GLOW;
57
58 void setVar(const std::string& name, const F32& value);
59 void clearVar(const std::string& name);
60 void clearAllVariables();
61// void updateVariables(LLSD& vars);
62
63 bool evalString(const std::string& expression, F32& result);
64 std::string::size_type getLastErrorPos() { return mLastErrorPos; }
65
66 static LLCalc* getInstance();
67 static void cleanUp();
68
69 typedef std::map<std::string, F32> calc_map_t;
70
71private:
72 std::string::size_type mLastErrorPos;
73
74 calc_map_t* mConstants;
75 calc_map_t* mVariables;
76
77 // *TODO: Add support for storing user defined variables, and stored functions.
78 // Will need UI work, and a means to save them between sessions.
79// calc_map_t* mUserVariables;
80
81 // "There shall be only one"
82 static LLCalc* sInstance;
83};
84
85#endif // LL_CALC_H
diff --git a/linden/indra/llmath/llcalcparser.cpp b/linden/indra/llmath/llcalcparser.cpp
new file mode 100644
index 0000000..1546c09
--- /dev/null
+++ b/linden/indra/llmath/llcalcparser.cpp
@@ -0,0 +1,45 @@
1/*
2 * LLCalcParser.cpp
3 * SecondLife
4 *
5 * Created by Aimee Walton on 28/09/2008.
6 * Copyright 2008 Aimee Walton.
7 *
8 */
9
10#include "linden_common.h"
11
12#include "llcalcparser.h"
13
14F32 LLCalcParser::lookup(const std::string::iterator& start, const std::string::iterator& end) const
15{
16 LLCalc::calc_map_t::iterator iter;
17
18 std::string name(start, end);
19
20 if (mConstants)
21 {
22 iter = mConstants->find(name);
23 if (iter != mConstants->end())
24 {
25 return (*iter).second;
26 }
27 }
28 else
29 {
30 // This should never happen!
31 boost::spirit::throw_(end, std::string("Missing constants table"));
32 }
33
34 if (mVariables)
35 {
36 iter = mVariables->find(name);
37 if (iter != mVariables->end())
38 {
39 return (*iter).second;
40 }
41 }
42
43 boost::spirit::throw_(end, std::string("Unknown symbol " + name));
44 return 0.f;
45}
diff --git a/linden/indra/llmath/llcalcparser.h b/linden/indra/llmath/llcalcparser.h
new file mode 100644
index 0000000..c405b62
--- /dev/null
+++ b/linden/indra/llmath/llcalcparser.h
@@ -0,0 +1,155 @@
1/*
2 * LLCalcParser.h
3 * SecondLife
4 *
5 * Created by Aimee Walton on 28/09/2008.
6 * Copyright 2008 Aimee Walton.
7 *
8 */
9
10#ifndef LL_CALCPARSER_H
11#define LL_CALCPARSER_H
12
13#include <boost/spirit/attribute.hpp>
14#include <boost/spirit/core.hpp>
15#include <boost/spirit/error_handling.hpp>
16#include <boost/spirit/iterator/position_iterator.hpp>
17#include <boost/spirit/phoenix/binders.hpp>
18//#include <boost/spirit/symbols/symbols.hpp>
19#include <map>
20#include <string>
21
22#include "llcalc.h"
23#include "llmath.h"
24
25struct LLCalcParser : boost::spirit::grammar<LLCalcParser>
26{
27 LLCalcParser(F32& result, LLCalc::calc_map_t* constants, LLCalc::calc_map_t* vars) :
28 mResult(result), mConstants(constants), mVariables(vars) {};
29
30 struct value_closure : boost::spirit::closure<value_closure, F32>
31 {
32 member1 value;
33 };
34
35 template <typename ScannerT>
36 struct definition
37 {
38 // Rule declarations
39 boost::spirit::rule<ScannerT> statement, identifier;
40 boost::spirit::rule<ScannerT, value_closure::context_t> expression, term,
41 power,
42 unary_expr,
43 factor,
44 /*unary_func,
45 /binary_func,*/
46 group;
47
48 // start() should return the starting symbol
49 boost::spirit::rule<ScannerT> const& start() const { return statement; }
50
51 definition(LLCalcParser const& self)
52 {
53 using namespace boost::spirit;
54 using namespace phoenix;
55
56 assertion<std::string> assert_domain("Domain error");
57// assertion<std::string> assert_symbol("Unknown symbol");
58 assertion<std::string> assert_syntax("Syntax error");
59
60 identifier =
61 lexeme_d[(alpha_p | '_') >> *(alnum_p | '_')]
62 ;
63
64 group =
65 '(' >> expression[group.value = arg1] >> assert_syntax(ch_p(')'))
66 ;
67
68 /*unary_func =
69 ((str_p("SIN") >> '(' >> expression[unary_func.value = bind(&sin)(DEG_TO_RAD * arg1)]) |
70 (str_p("COS") >> '(' >> expression[unary_func.value = bind(&cos)(DEG_TO_RAD * arg1)]) |
71 (str_p("TAN") >> '(' >> expression[unary_func.value = bind(&tan)(DEG_TO_RAD * arg1)]) |
72 (str_p("ASIN") >> '(' >> expression[unary_func.value = (bind(&asin)(arg1)) * RAD_TO_DEG]) |
73 (str_p("ACOS") >> '(' >> expression[unary_func.value = bind(&acos)(arg1) * RAD_TO_DEG]) |
74 (str_p("ATAN") >> '(' >> expression[unary_func.value = bind(&atan)(arg1) * RAD_TO_DEG]) |
75 (str_p("SQRT") >> '(' >> expression[unary_func.value = bind(&sqrt)(arg1)]) |
76 (str_p("LOG") >> '(' >> expression[unary_func.value = bind(&log)(arg1)]) |
77 (str_p("EXP") >> '(' >> expression[unary_func.value = bind(&exp)(arg1)]) |
78 (str_p("ABS") >> '(' >> expression[unary_func.value = bind(&fabs)(arg1)])
79 ) >> assert_syntax(ch_p(')'))
80 ;
81
82 binary_func =
83 ((str_p("ATAN2") >> '(' >> expression[binary_func.value = arg1] >> ',' >>
84 expression[binary_func.value = bind(&atan2)(binary_func.value, arg1) * RAD_TO_DEG]) |
85 (str_p("MIN") >> '(' >> expression[binary_func.value = arg1] >> ',' >>
86 expression[binary_func.value = bind(&LLCalcParser::min)(self, binary_func.value, arg1)]) |
87 (str_p("MAX") >> '(' >> expression[binary_func.value = arg1] >> ',' >>
88 expression[binary_func.value = bind(&LLCalcParser::max)(self, binary_func.value, arg1)])
89 ) >> assert_syntax(ch_p(')'))
90 ;*/
91
92 // *TODO: Localisation of the decimal point?
93 // Problem, LLLineEditor::postvalidateFloat accepts a comma when appropriate
94 // for the current locale. However to do that here could clash with using
95 // the comma as a separator when passing arguments to functions.
96 factor =
97 (ureal_p[factor.value = arg1] |
98 group[factor.value = arg1] |
99 /*unary_func[factor.value = arg1] |
100 binary_func[factor.value = arg1] |*/
101 // Lookup throws an Unknown Symbol error if it is unknown, while this works fine,
102 // would be "neater" to handle symbol lookup from here with an assertive parser.
103// constants_p[factor.value = arg1]|
104 identifier[factor.value = bind(&LLCalcParser::lookup)(self, arg1, arg2)]
105 ) >>
106 // Detect and throw math errors.
107 assert_domain(eps_p(bind(&LLCalcParser::checkNaN)(self, factor.value)))
108 ;
109
110 unary_expr =
111 !ch_p('+') >> factor[unary_expr.value = arg1] |
112 '-' >> factor[unary_expr.value = -arg1]
113 ;
114
115 power =
116 unary_expr[power.value = arg1] >>
117 *('^' >> assert_syntax(unary_expr[power.value = bind(&powf)(power.value, arg1)]))
118 ;
119
120 term =
121 power[term.value = arg1] >>
122 *(('*' >> assert_syntax(power[term.value *= arg1])) |
123 ('/' >> assert_syntax(power[term.value /= arg1]))
124 )
125 ;
126
127 expression =
128 assert_syntax(term[expression.value = arg1]) >>
129 *(('+' >> assert_syntax(term[expression.value += arg1])) |
130 ('-' >> assert_syntax(term[expression.value -= arg1]))
131 )
132 ;
133
134 statement =
135 !ch_p('=') >> ( expression )[var(self.mResult) = arg1] >> (end_p)
136 ;
137 }
138 };
139
140private:
141 // Member functions for semantic actions
142 F32 lookup(const std::string::iterator&, const std::string::iterator&) const;
143 F32 min(const F32& a, const F32& b) const { return llmin(a, b); }
144 F32 max(const F32& a, const F32& b) const { return llmax(a, b); }
145
146 bool checkNaN(const F32& a) const { return !llisnan(a); }
147
148 LLCalc::calc_map_t* mConstants;
149 LLCalc::calc_map_t* mVariables;
150// LLCalc::calc_map_t* mUserVariables;
151
152 F32& mResult;
153};
154
155#endif // LL_CALCPARSER_H
diff --git a/linden/indra/llmedia/CMakeLists.txt b/linden/indra/llmedia/CMakeLists.txt
index 8ef8006..026afc1 100644
--- a/linden/indra/llmedia/CMakeLists.txt
+++ b/linden/indra/llmedia/CMakeLists.txt
@@ -29,6 +29,9 @@ set(llmedia_SOURCE_FILES
29 llmediaimplexample2.cpp 29 llmediaimplexample2.cpp
30 llmediaimplfactory.cpp 30 llmediaimplfactory.cpp
31 llmediamanager.cpp 31 llmediamanager.cpp
32 llmediaimplgstreamer.cpp
33 llmediaimplgstreamer_syms.cpp
34 llmediaimplgstreamervidplug.cpp
32 ) 35 )
33 36
34set(llmedia_HEADER_FILES 37set(llmedia_HEADER_FILES
@@ -43,21 +46,11 @@ set(llmedia_HEADER_FILES
43 llmediaimplregister.h 46 llmediaimplregister.h
44 llmediamanager.h 47 llmediamanager.h
45 llmediaobserver.h 48 llmediaobserver.h
49 llmediaimplgstreamer.h
50 llmediaimplgstreamervidplug.h
51 llmediaimplgstreamer_syms.h
46 ) 52 )
47 53
48if (GSTREAMER)
49 list(APPEND llmedia_SOURCE_FILES
50 llmediaimplgstreamer.cpp
51 llmediaimplgstreamer_syms.cpp
52 llmediaimplgstreamervidplug.cpp
53 )
54
55 list(APPEND llmedia_HEADER_FILES
56 llmediaimplgstreamer.h
57 llmediaimplgstreamervidplug.h
58 llmediaimplgstreamer_syms.h
59 )
60
61 # Work around a bad interaction between broken gstreamer headers and 54 # Work around a bad interaction between broken gstreamer headers and
62 # g++ 4.3's increased strictness. 55 # g++ 4.3's increased strictness.
63 56
@@ -65,7 +58,6 @@ if (GSTREAMER)
65 set_source_files_properties(llmediaimplgstreamervidplug.cpp PROPERTIES 58 set_source_files_properties(llmediaimplgstreamervidplug.cpp PROPERTIES
66 COMPILE_FLAGS -Wno-error=write-strings) 59 COMPILE_FLAGS -Wno-error=write-strings)
67 endif (${CXX_VERSION} MATCHES "4.[23]") 60 endif (${CXX_VERSION} MATCHES "4.[23]")
68endif (GSTREAMER)
69 61
70if (MOZLIB) 62if (MOZLIB)
71 list(APPEND llmedia_SOURCE_FILES llmediaimplllmozlib.cpp) 63 list(APPEND llmedia_SOURCE_FILES llmediaimplllmozlib.cpp)
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp
index 5d6a648..d889f6f 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer.cpp
+++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp
@@ -32,7 +32,7 @@
32 32
33#include "llmediaimplgstreamer.h" 33#include "llmediaimplgstreamer.h"
34 34
35#if LL_GSTREAMER_ENABLED 35///#if LL_GSTREAMER_ENABLED
36 36
37extern "C" { 37extern "C" {
38#include <gst/gst.h> 38#include <gst/gst.h>
@@ -49,6 +49,8 @@ extern "C" {
49 49
50#include "llmediaimplgstreamer_syms.h" 50#include "llmediaimplgstreamer_syms.h"
51 51
52#include "llerror.h"
53
52// register this impl with media manager factory 54// register this impl with media manager factory
53static LLMediaImplRegister sLLMediaImplGStreamerReg( "LLMediaImplGStreamer", new LLMediaImplGStreamerMaker() ); 55static LLMediaImplRegister sLLMediaImplGStreamerReg( "LLMediaImplGStreamer", new LLMediaImplGStreamerMaker() );
54 56
@@ -73,12 +75,14 @@ LLMediaImplGStreamer () :
73 mTextureFormatType ( LL_MEDIA_UNSIGNED_INT_8_8_8_8_REV ), 75 mTextureFormatType ( LL_MEDIA_UNSIGNED_INT_8_8_8_8_REV ),
74 mPump ( NULL ), 76 mPump ( NULL ),
75 mPlaybin ( NULL ), 77 mPlaybin ( NULL ),
76 mVideoSink ( NULL ) 78 mVideoSink ( NULL ),
79 mState( GST_STATE_NULL )
77#ifdef LL_GST_SOUNDSINK 80#ifdef LL_GST_SOUNDSINK
78 ,mAudioSink ( NULL ) 81 ,mAudioSink ( NULL )
79#endif // LL_GST_SOUNDSINK 82#endif // LL_GST_SOUNDSINK
80{ 83{
81 DEBUGMSG("constructing media..."); 84 LL_DEBUGS("MediaManager") << "constructing media..." << LL_ENDL;
85 mVolume = -1.0; // XXX Hack to make the vould change happend first time
82 86
83 setMediaDepth(4); 87 setMediaDepth(4);
84 88
@@ -97,13 +101,15 @@ LLMediaImplGStreamer () :
97 return; // error 101 return; // error
98 } 102 }
99 103
100 if (NULL == getenv("LL_GSTREAMER_EXTERNAL")) { 104 if (NULL == getenv("LL_GSTREAMER_EXTERNAL"))
105 {
101 // instantiate and connect a custom video sink 106 // instantiate and connect a custom video sink
107 LL_DEBUGS("MediaManager") << "extrenal video sink..." << LL_ENDL;
102 mVideoSink = 108 mVideoSink =
103 GST_SLVIDEO(llgst_element_factory_make ("private-slvideo", "slvideo")); 109 GST_SLVIDEO(llgst_element_factory_make ("private-slvideo", "slvideo"));
104 if (!mVideoSink) 110 if (!mVideoSink)
105 { 111 {
106 WARNMSG("Could not instantiate private-slvideo element."); 112 LL_WARNS("MediaImpl") << "Could not instantiate private-slvideo element." << LL_ENDL;
107 // todo: cleanup. 113 // todo: cleanup.
108 return; // error 114 return; // error
109 } 115 }
@@ -111,12 +117,13 @@ LLMediaImplGStreamer () :
111 g_object_set(mPlaybin, "video-sink", mVideoSink, NULL); 117 g_object_set(mPlaybin, "video-sink", mVideoSink, NULL);
112 118
113#ifdef LL_GST_SOUNDSINK 119#ifdef LL_GST_SOUNDSINK
120 LL_DEBUGS("MediaManager") << "extrenal audio sink..." << LL_ENDL;
114 // instantiate and connect a custom audio sink 121 // instantiate and connect a custom audio sink
115 mAudioSink = 122 mAudioSink =
116 GST_SLSOUND(llgst_element_factory_make ("private-slsound", "slsound")); 123 GST_SLSOUND(llgst_element_factory_make ("private-slsound", "slsound"));
117 if (!mAudioSink) 124 if (!mAudioSink)
118 { 125 {
119 WARNMSG("Could not instantiate private-slsound element."); 126 LL_WARN("MediaImpl") << "Could not instantiate private-slsound element." << LL_ENDL;
120 // todo: cleanup. 127 // todo: cleanup.
121 return; // error 128 return; // error
122 } 129 }
@@ -149,7 +156,7 @@ int LLMediaImplGStreamer::getTextureFormatInternal() const
149LLMediaImplGStreamer:: 156LLMediaImplGStreamer::
150~LLMediaImplGStreamer () 157~LLMediaImplGStreamer ()
151{ 158{
152 DEBUGMSG("dtor of media..."); 159 LL_DEBUGS("MediaImpl") << ("dtor of media...") << LL_ENDL;
153 unload(); 160 unload();
154} 161}
155 162
@@ -161,36 +168,41 @@ std::string LLMediaImplGStreamer::getVersion()
161 rtn = "[" + sLLMediaImplGStreamerReg.getImplName() + "] - GStreamer 0.10.x"; 168 rtn = "[" + sLLMediaImplGStreamerReg.getImplName() + "] - GStreamer 0.10.x";
162 return rtn; 169 return rtn;
163} 170}
164 171//
172//THIS IS THE METHOD THAT'S BREAKING STUFF
165/////////////////////////////////////////////////////////////////////////////// 173///////////////////////////////////////////////////////////////////////////////
166// (static) super-initialization - called once at application startup 174// (static) super-initialization - called once at application startup
167bool 175bool LLMediaImplGStreamer::startup (LLMediaManagerData* init_data)
168LLMediaImplGStreamer::
169startup ( LLMediaManagerData* init_data )
170{ 176{
171 static bool done_init = false; 177 static bool done_init = false;
172 if (!done_init) 178 if (!done_init)
173 { 179 {
180 // Init the glib type system - we need it.
181 g_type_init();
182
174 // Get symbols! 183 // Get symbols!
175 if (! grab_gst_syms("libgstreamer-0.10.so.0", 184#if LL_WINDOWS
176 "libgstvideo-0.10.so.0", 185 if (! grab_gst_syms("libgstreamer-0.10.dll", "libgstvideo-0.10.dll", "libgstaudio-0.10.dll") )
177 "libgstaudio-0.10.so.0") ) 186#else
187 if (! grab_gst_syms("libgstreamer-0.10.so.0", "libgstvideo-0.10.so.0", "libgstaudio-0.10.so.0") )
178 { 188 {
179 WARNMSG("Couldn't find suitable GStreamer 0.10 support on this system - video playback disabled."); 189 LL_WARNS("MediaImpl") << "Couldn't find suitable GStreamer 0.10 support on this system - video playback disabled." << LL_ENDL;
180 return false; 190 return false;
181 } 191 }
182 192#endif
183 if (llgst_segtrap_set_enabled) 193 if (llgst_segtrap_set_enabled)
184 llgst_segtrap_set_enabled(FALSE); 194 llgst_segtrap_set_enabled(FALSE);
185 else 195 else
186 WARNMSG("gst_segtrap_set_enabled() is not available; Automated crash-reporter may cease to function until next restart."); 196 {
197 LL_WARNS("MediaImpl") << "gst_segtrap_set_enabled() is not available; Automated crash-reporter may cease to function until next restart." << LL_ENDL;
198 }
187 199
188 // Protect against GStreamer resetting the locale, yuck. 200 // Protect against GStreamer resetting the locale, yuck.
189 static std::string saved_locale; 201 static std::string saved_locale;
190 saved_locale = setlocale(LC_ALL, NULL); 202 saved_locale = setlocale(LC_ALL, NULL);
191 if (0 == llgst_init_check(NULL, NULL, NULL)) 203 if (0 == llgst_init_check(NULL, NULL, NULL))
192 { 204 {
193 WARNMSG("GST init failed for unspecified reason."); 205 LL_WARNS("MediaImpl") << "GST init failed for unspecified reason." << LL_ENDL;
194 setlocale(LC_ALL, saved_locale.c_str() ); 206 setlocale(LC_ALL, saved_locale.c_str() );
195 return false; 207 return false;
196 } 208 }
@@ -204,16 +216,13 @@ startup ( LLMediaManagerData* init_data )
204 216
205 done_init = true; 217 done_init = true;
206 } 218 }
207
208 return true; 219 return true;
209} 220}
210 221
211 222
212bool LLMediaImplGStreamer:: 223bool LLMediaImplGStreamer::closedown()
213closedown()
214{ 224{
215 ungrab_gst_syms(); 225 ungrab_gst_syms();
216
217 return true; 226 return true;
218} 227}
219 228
@@ -222,145 +231,164 @@ closedown()
222// 231//
223//#define LL_GST_REPORT_STATE_CHANGES 232//#define LL_GST_REPORT_STATE_CHANGES
224#ifdef LL_GST_REPORT_STATE_CHANGES 233#ifdef LL_GST_REPORT_STATE_CHANGES
225static char* get_gst_state_name(GstState state) 234static const char* get_gst_state_name(GstState state)
226{ 235{
227 switch (state) { 236 switch (state)
228 case GST_STATE_VOID_PENDING: return "VOID_PENDING"; 237 {
229 case GST_STATE_NULL: return "NULL"; 238 case GST_STATE_VOID_PENDING: return "VOID_PENDING";
230 case GST_STATE_READY: return "READY"; 239 case GST_STATE_NULL: return "NULL";
231 case GST_STATE_PAUSED: return "PAUSED"; 240 case GST_STATE_READY: return "READY";
232 case GST_STATE_PLAYING: return "PLAYING"; 241 case GST_STATE_PAUSED: return "PAUSED";
242 case GST_STATE_PLAYING: return "PLAYING";
233 } 243 }
234 return "(unknown)"; 244 return "(unknown)";
235} 245}
236#endif // LL_GST_REPORT_STATE_CHANGES 246#endif // LL_GST_REPORT_STATE_CHANGES
237 247
238//static 248//static
239gboolean 249gboolean LLMediaImplGStreamer::bus_callback(GstBus *bus, GstMessage *message, gpointer data)
240LLMediaImplGStreamer::bus_callback (GstBus *bus,
241 GstMessage *message,
242 gpointer data)
243{ 250{
244 if (GST_MESSAGE_TYPE(message) != GST_MESSAGE_STATE_CHANGED && 251 LL_DEBUGS("MediaCallback") << "Got GST message type: " << LLGST_MESSAGE_TYPE_NAME (message) << LL_ENDL;
245 GST_MESSAGE_TYPE(message) != GST_MESSAGE_BUFFERING)
246 {
247 DEBUGMSG("Got GST message type: %s",
248 LLGST_MESSAGE_TYPE_NAME (message));
249 }
250 else
251 {
252 DEBUGMSG("Got GST message type: %s",
253 LLGST_MESSAGE_TYPE_NAME (message));
254 }
255 252
256 LLMediaImplGStreamer *impl = (LLMediaImplGStreamer*)data; 253 LLMediaImplGStreamer *impl = (LLMediaImplGStreamer*)data;
257 254
258 switch (GST_MESSAGE_TYPE (message)) { 255 switch (GST_MESSAGE_TYPE (message))
259 case GST_MESSAGE_BUFFERING: { 256 {
260 // NEEDS GST 0.10.11+ 257 case GST_MESSAGE_BUFFERING:
261 if (llgst_message_parse_buffering)
262 { 258 {
263 gint percent = 0; 259 // NEEDS GST 0.10.11+
264 llgst_message_parse_buffering(message, &percent); 260 if (llgst_message_parse_buffering)
265 DEBUGMSG("GST buffering: %d%%", percent); 261 {
266 LLMediaEvent event( impl, percent ); 262 gint percent = 0;
267 impl->getEventEmitter().update( &LLMediaObserver::onUpdateProgress, event ); 263 llgst_message_parse_buffering(message, &percent);
268 264 LL_DEBUGS("MediaBuffering") << "GST buffering: " << percent << "%%" << LL_ENDL;
265 LLMediaEvent event( impl, percent );
266 impl->getEventEmitter().update( &LLMediaObserver::onUpdateProgress, event );
267 }
269 } 268 }
270 break; 269 break;
271 } 270 case GST_MESSAGE_STATE_CHANGED:
272 case GST_MESSAGE_STATE_CHANGED: { 271 {
273 GstState old_state; 272 GstState old_state;
274 GstState new_state; 273 GstState new_state;
275 GstState pending_state; 274 GstState pending_state;
276 llgst_message_parse_state_changed(message, 275 llgst_message_parse_state_changed(message,
277 &old_state, 276 &old_state,
278 &new_state, 277 &new_state,
279 &pending_state); 278 &pending_state);
280#ifdef LL_GST_REPORT_STATE_CHANGES 279#ifdef LL_GST_REPORT_STATE_CHANGES
281 // not generally very useful, and rather spammy. 280 // not generally very useful, and rather spammy.
282 DEBUGMSG("state change (old,<new>,pending): %s,<%s>,%s", 281 LL_DEBUGS("MediaState") << "GST state change (old,<new>,pending): "<< get_gst_state_name(old_state) << ",<" << get_gst_state_name(new_state) << ">," << get_gst_state_name(pending_state) << LL_ENDL;
283 get_gst_state_name(old_state),
284 get_gst_state_name(new_state),
285 get_gst_state_name(pending_state));
286#endif // LL_GST_REPORT_STATE_CHANGES 282#endif // LL_GST_REPORT_STATE_CHANGES
287 283
288 switch (new_state) { 284 switch (new_state)
289 case GST_STATE_VOID_PENDING: 285 {
290 break; 286 case GST_STATE_VOID_PENDING:
291 case GST_STATE_NULL: 287 break;
292 break; 288 case GST_STATE_NULL:
293 case GST_STATE_READY: 289 LL_DEBUGS("MediaImpl") << "State changed to NULL" << LL_ENDL;
294 break; 290 if (impl->getState() == GST_STATE_PLAYING)
295 case GST_STATE_PAUSED: 291 { // We got stoped by gstremer...
296 break; 292 impl->play();
297 case GST_STATE_PLAYING: 293 LL_DEBUGS("MediaImpl") << "Trying to restart." << LL_ENDL;
298 LLMediaEvent event( impl, 100 ); 294 }
299 impl->getEventEmitter().update( &LLMediaObserver::onUpdateProgress, event ); 295 break;
300 // emit an event to say that a media source was loaded 296 case GST_STATE_READY:
301 LLMediaEvent event2( impl ); 297 break;
302 impl->getEventEmitter().update( &LLMediaObserver::onMediaLoaded, event2 ); 298 case GST_STATE_PAUSED:
299 break;
300 case GST_STATE_PLAYING:
301 LLMediaEvent event( impl, 100 );
302 impl->getEventEmitter().update( &LLMediaObserver::onUpdateProgress, event );
303 // emit an event to say that a media source was loaded
304 LLMediaEvent event2( impl );
305 impl->getEventEmitter().update( &LLMediaObserver::onMediaLoaded, event2 );
306 break;
307 }
303 break; 308 break;
304 } 309 }
305 break; 310 case GST_MESSAGE_ERROR:
306 } 311 {
307 case GST_MESSAGE_ERROR: { 312 GError *err = NULL;
308 GError *err = NULL; 313 gchar *debug = NULL;
309 gchar *debug = NULL;
310 314
311 llgst_message_parse_error (message, &err, &debug); 315 llgst_message_parse_error (message, &err, &debug);
312 WARNMSG("GST error: %s", err->message); 316 LL_WARNS("MediaImpl") << "GST Error: " << err->message << LL_ENDL;
313 g_error_free (err); 317 g_error_free (err);
314 g_free (debug); 318 g_free (debug);
315 319
316 impl->addCommand(LLMediaBase::COMMAND_STOP); 320 impl->addCommand(LLMediaBase::COMMAND_STOP);
321 //impl->addCommand(LLMediaBase::COMMAND_START);
317 322
318 break; 323 break;
319 } 324 }
320 case GST_MESSAGE_INFO: { 325 case GST_MESSAGE_INFO:
321 if (llgst_message_parse_info) 326 {
327 if (llgst_message_parse_info)
328 {
329 GError *err = NULL;
330 gchar *debug = NULL;
331
332 llgst_message_parse_info (message, &err, &debug);
333 LL_INFOS("MediaImpl") << "GST info: " << err->message
334 << LL_ENDL;
335 g_error_free (err);
336 g_free (debug);
337 }
338 break;
339 }
340 case GST_MESSAGE_WARNING:
322 { 341 {
323 GError *err = NULL; 342 GError *err = NULL;
324 gchar *debug = NULL; 343 gchar *debug = NULL;
325 344
326 llgst_message_parse_info (message, &err, &debug); 345 llgst_message_parse_warning (message, &err, &debug);
327 INFOMSG("GST info: %s", err->message); 346 LL_WARNS("MediaImpl") << "GST warning: " << err->message
347 << LL_ENDL;
328 g_error_free (err); 348 g_error_free (err);
329 g_free (debug); 349 g_free (debug);
330 }
331 break;
332 }
333 case GST_MESSAGE_WARNING: {
334 GError *err = NULL;
335 gchar *debug = NULL;
336 350
337 llgst_message_parse_warning (message, &err, &debug); 351 break;
338 WARNMSG("GST warning: %s", err->message); 352 }
339 g_error_free (err); 353 case GST_MESSAGE_TAG:
340 g_free (debug);
341
342 break;
343 }
344 case GST_MESSAGE_EOS:
345 /* end-of-stream */
346 DEBUGMSG("GST end-of-stream.");
347 if (impl->isLooping())
348 { 354 {
349 DEBUGMSG("looping media..."); 355#if 0
350 impl->stop(); 356 GstTagList *tag_list;
351 impl->play(); 357 gchar *title;
358 gchar *artist;
359 llgst_message_parse_tag(message, &tag_list);
360 gboolean hazTitle = llgst_tag_list_get_string(tag_list,
361 GST_TAG_TITLE, &title);
362 gboolean hazArtist = llgst_tag_list_get_string(tag_list,
363 GST_TAG_ARTIST, &artist);
364 if(hazTitle)
365 LL_INFOS("MediaInfo") << "Title is " << title << LL_ENDL;
366 if(hazArtist)
367 LL_INFOS("MediaInfo") << "Artist is " << artist << LL_ENDL;
368#endif
369 break;
352 } 370 }
353 else 371 case GST_MESSAGE_EOS:
354 { 372 {
355 // inject a COMMAND_STOP 373 /* end-of-stream */
356 impl->addCommand(LLMediaBase::COMMAND_STOP); 374 LL_DEBUGS("MediaImpl") << "GST end-of-stream." << LL_ENDL;
375 if (impl->isLooping())
376 {
377 LL_DEBUGS("MediaImpl") << "looping media..." << LL_ENDL;
378 impl->stop();
379 impl->play();
380 }
381 else
382 {
383 // inject a COMMAND_STOP
384 impl->addCommand(LLMediaBase::COMMAND_STOP);
385 }
386 break;
387 default:
388 /* unhandled message */
389 break;
357 } 390 }
358 break;
359 default:
360 /* unhandled message */
361 break;
362 } 391 }
363
364 /* we want to be notified again the next time there is a message 392 /* we want to be notified again the next time there is a message
365 * on the bus, so return true (false means we want to stop watching 393 * on the bus, so return true (false means we want to stop watching
366 * for messages on the bus and our callback should not be called again) 394 * for messages on the bus and our callback should not be called again)
@@ -370,11 +398,10 @@ LLMediaImplGStreamer::bus_callback (GstBus *bus,
370 398
371/////////////////////////////////////////////////////////// 399///////////////////////////////////////////////////////////
372// virtual 400// virtual
373bool 401bool LLMediaImplGStreamer::navigateTo (const std::string urlIn)
374LLMediaImplGStreamer::
375navigateTo ( const std::string urlIn )
376{ 402{
377 DEBUGMSG("Setting media URI: %s", urlIn.c_str()); 403 LL_DEBUGS("MediaImpl") << "Setting media URI: " << urlIn.c_str()
404 << LL_ENDL;
378 405
379 if (NULL == mPump 406 if (NULL == mPump
380#ifdef LL_GST_SOUNDSINK 407#ifdef LL_GST_SOUNDSINK
@@ -408,14 +435,13 @@ navigateTo ( const std::string urlIn )
408 435
409/////////////////////////////////////////////////////////////////////////////// 436///////////////////////////////////////////////////////////////////////////////
410// 437//
411bool 438bool LLMediaImplGStreamer::unload()
412LLMediaImplGStreamer::
413unload ()
414{ 439{
415 DEBUGMSG("unloading media..."); 440 LL_DEBUGS("MediaImpl") << "unloading media..." << LL_ENDL;
416 if (mPlaybin) 441 if (mPlaybin)
417 { 442 {
418 llgst_element_set_state (mPlaybin, GST_STATE_NULL); 443 llgst_element_set_state (mPlaybin, GST_STATE_NULL);
444 mState = GST_STATE_NULL;
419 llgst_object_unref (GST_OBJECT (mPlaybin)); 445 llgst_object_unref (GST_OBJECT (mPlaybin));
420 mPlaybin = NULL; 446 mPlaybin = NULL;
421 } 447 }
@@ -439,11 +465,9 @@ unload ()
439 465
440/////////////////////////////////////////////////////////////////////////////// 466///////////////////////////////////////////////////////////////////////////////
441// virtual 467// virtual
442bool 468bool LLMediaImplGStreamer::updateMedia()
443LLMediaImplGStreamer::
444updateMedia ()
445{ 469{
446 DEBUGMSG("updating media..."); 470 //LL_DEBUGS("MediaImpl") << "updating media..." << LL_ENDL;
447 471
448 // sanity check 472 // sanity check
449 if (NULL == mPump 473 if (NULL == mPump
@@ -452,7 +476,7 @@ updateMedia ()
452#endif 476#endif
453 || NULL == mPlaybin) 477 || NULL == mPlaybin)
454 { 478 {
455 DEBUGMSG("dead media..."); 479 LL_DEBUGS("MediaImpl") << "dead media..." << LL_ENDL;
456 return false; 480 return false;
457 } 481 }
458 482
@@ -460,36 +484,33 @@ updateMedia ()
460 switch (nextCommand()) 484 switch (nextCommand())
461 { 485 {
462 case LLMediaBase::COMMAND_START: 486 case LLMediaBase::COMMAND_START:
463 DEBUGMSG("COMMAND_START"); 487 LL_DEBUGS("MediaImpl") << "COMMAND_START" << LL_ENDL;
464 if (getStatus() == LLMediaBase::STATUS_PAUSED || 488 if (getStatus() == LLMediaBase::STATUS_PAUSED ||
465 getStatus() == LLMediaBase::STATUS_NAVIGATING || 489 getStatus() == LLMediaBase::STATUS_NAVIGATING ||
466 getStatus() == LLMediaBase::STATUS_STOPPED) 490 getStatus() == LLMediaBase::STATUS_STOPPED)
467 { 491 {
468 DEBUGMSG("doing COMMAND_START");
469 play(); 492 play();
470 setStatus(LLMediaBase::STATUS_STARTED); 493 setStatus(LLMediaBase::STATUS_STARTED);
471 clearCommand(); 494 clearCommand();
472 } 495 }
473 break; 496 break;
474 case LLMediaBase::COMMAND_STOP: 497 case LLMediaBase::COMMAND_STOP:
475 DEBUGMSG("COMMAND_STOP"); 498 LL_DEBUGS("MediaImpl") << "COMMAND_STOP" << LL_ENDL;
476 DEBUGMSG("doing COMMAND_STOP");
477 stop(); 499 stop();
478 setStatus(LLMediaBase::STATUS_STOPPED); 500 setStatus(LLMediaBase::STATUS_STOPPED);
479 clearCommand(); 501 clearCommand();
480 break; 502 break;
481 case LLMediaBase::COMMAND_PAUSE: 503 case LLMediaBase::COMMAND_PAUSE:
482 DEBUGMSG("COMMAND_PAUSE"); 504 LL_DEBUGS("MediaImpl") << "COMMAND_PAUSE" << LL_ENDL;
483 if (getStatus() == LLMediaBase::STATUS_STARTED) 505 if (getStatus() == LLMediaBase::STATUS_STARTED)
484 { 506 {
485 DEBUGMSG("doing COMMAND_PAUSE");
486 pause(); 507 pause();
487 setStatus(LLMediaBase::STATUS_PAUSED); 508 setStatus(LLMediaBase::STATUS_PAUSED);
488 clearCommand(); 509 clearCommand();
489 } 510 }
490 break; 511 break;
491 default: 512 default:
492 DEBUGMSG("COMMAND_?"); 513 LL_INFOS("MediaImpl") << "Unknown command" << LL_ENDL;
493 clearCommand(); 514 clearCommand();
494 break; 515 break;
495 case LLMediaBase::COMMAND_NONE: 516 case LLMediaBase::COMMAND_NONE:
@@ -507,7 +528,7 @@ updateMedia ()
507 GST_OBJECT_LOCK(mVideoSink); 528 GST_OBJECT_LOCK(mVideoSink);
508 if (mVideoSink->retained_frame_ready) 529 if (mVideoSink->retained_frame_ready)
509 { 530 {
510 DEBUGMSG("NEW FRAME "); 531 LL_DEBUGS("MediaImpl") <<"NEW FRAME " << LL_ENDL;
511 if (mVideoSink->retained_frame_width != getMediaWidth() || 532 if (mVideoSink->retained_frame_width != getMediaWidth() ||
512 mVideoSink->retained_frame_height != getMediaHeight()) 533 mVideoSink->retained_frame_height != getMediaHeight())
513 // *TODO: also check for change in format 534 // *TODO: also check for change in format
@@ -527,8 +548,9 @@ updateMedia ()
527 mTextureFormatType = LL_MEDIA_UNSIGNED_INT_8_8_8_8_REV; 548 mTextureFormatType = LL_MEDIA_UNSIGNED_INT_8_8_8_8_REV;
528 } 549 }
529 mMediaRowbytes = neww * newd; 550 mMediaRowbytes = neww * newd;
530 DEBUGMSG("video container resized to %dx%d", 551 LL_DEBUGS("MediaImpl")
531 neww, newh); 552 << "video container resized to " <<
553 neww <<"x"<< newh << LL_ENDL;
532 554
533 delete[] mediaData; 555 delete[] mediaData;
534 mediaData = new unsigned char[mMediaRowbytes * 556 mediaData = new unsigned char[mMediaRowbytes *
@@ -564,46 +586,41 @@ updateMedia ()
564 586
565/////////////////////////////////////////////////////////////////////////////// 587///////////////////////////////////////////////////////////////////////////////
566// 588//
567bool 589bool LLMediaImplGStreamer::stop()
568LLMediaImplGStreamer::
569stop ()
570{ 590{
571 DEBUGMSG("stopping media..."); 591 LL_DEBUGS("MediaImpl") << "stopping media..." << LL_ENDL;
572 // todo: error-check this? 592 // todo: error-check this?
573 llgst_element_set_state(mPlaybin, GST_STATE_READY); 593 llgst_element_set_state(mPlaybin, GST_STATE_READY);
594 mState = GST_STATE_READY;
574 return true; 595 return true;
575} 596}
576 597
577/////////////////////////////////////////////////////////////////////////////// 598///////////////////////////////////////////////////////////////////////////////
578// 599//
579bool 600bool LLMediaImplGStreamer::play()
580LLMediaImplGStreamer::
581play ()
582{ 601{
583 DEBUGMSG("playing media..."); 602 LL_DEBUGS("MediaImpl") << "playing media..." << LL_ENDL;
584 // todo: error-check this? 603 // todo: error-check this?
585 llgst_element_set_state(mPlaybin, GST_STATE_PLAYING); 604 llgst_element_set_state(mPlaybin, GST_STATE_PLAYING);
605 mState = GST_STATE_PLAYING;
586 return true; 606 return true;
587} 607}
588 608
589/////////////////////////////////////////////////////////////////////////////// 609///////////////////////////////////////////////////////////////////////////////
590// 610//
591bool 611bool LLMediaImplGStreamer::pause()
592LLMediaImplGStreamer::
593pause ()
594{ 612{
595 DEBUGMSG("pausing media..."); 613 LL_DEBUGS("MediaImpl") <<"pausing media..." << LL_ENDL;
596 // todo: error-check this? 614 // todo: error-check this?
597 llgst_element_set_state(mPlaybin, GST_STATE_PAUSED); 615 llgst_element_set_state(mPlaybin, GST_STATE_PAUSED);
616 mState = GST_STATE_PAUSED;
598 return true; 617 return true;
599}; 618};
600 619
601 620
602/////////////////////////////////////////////////////////////////////////////// 621///////////////////////////////////////////////////////////////////////////////
603// virtual 622// virtual
604unsigned char* 623unsigned char* LLMediaImplGStreamer::getMediaData()
605LLMediaImplGStreamer::
606getMediaData ()
607{ 624{
608 return mediaData; 625 return mediaData;
609} 626}
@@ -611,9 +628,7 @@ getMediaData ()
611 628
612/////////////////////////////////////////////////////////////////////////////// 629///////////////////////////////////////////////////////////////////////////////
613// virtual 630// virtual
614bool 631bool LLMediaImplGStreamer::seek(double time)
615LLMediaImplGStreamer::
616seek( double time )
617{ 632{
618 bool success = false; 633 bool success = false;
619 if (mPlaybin) 634 if (mPlaybin)
@@ -624,18 +639,22 @@ seek( double time )
624 GST_SEEK_TYPE_SET, gint64(time*1000000000.0F), 639 GST_SEEK_TYPE_SET, gint64(time*1000000000.0F),
625 GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); 640 GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE);
626 } 641 }
627 DEBUGMSG("MEDIA SEEK REQUEST to %fsec result was %d", 642 LL_DEBUGS("MediaImpl") << "MEDIA SEEK REQUEST to " << float(time)
628 float(time), int(success)); 643 << "sec result was " << int(success) << LL_ENDL;
629 return success; 644 return success;
630} 645}
631 646
632 647
633/////////////////////////////////////////////////////////////////////////////// 648///////////////////////////////////////////////////////////////////////////////
634// virtual 649// virtual
635bool 650bool LLMediaImplGStreamer::setVolume(float volume)
636LLMediaImplGStreamer::
637setVolume(float volume)
638{ 651{
652 // XXX hack to make volume volume changes less othen
653 // bug in gstreamer 0.10.21
654 if(mVolume == volume)
655 return true;
656
657 LL_DEBUGS("MediaImpl") << "setVolume(" << volume << ") : " << getpid() << LL_ENDL;
639 mVolume = volume; 658 mVolume = volume;
640 if (mPlaybin) 659 if (mPlaybin)
641 { 660 {
@@ -645,4 +664,6 @@ setVolume(float volume)
645 return false; 664 return false;
646} 665}
647 666
648#endif // LL_GSTREAMER_ENABLED 667
668
669///#endif // LL_GSTREAMER_ENABLED
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.h b/linden/indra/llmedia/llmediaimplgstreamer.h
index 247b0ce..4b9353b 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer.h
+++ b/linden/indra/llmedia/llmediaimplgstreamer.h
@@ -31,20 +31,19 @@
31 */ 31 */
32 32
33// header guard 33// header guard
34#ifndef llmediaimplgstreamer_h 34///#ifndef llmediaimplgstreamer_h
35#define llmediaimplgstreamer_h 35#define llmediaimplgstreamer_h
36 36
37#include "llmediaimplcommon.h" 37#include "llmediaimplcommon.h"
38#include "llmediaimplfactory.h" 38#include "llmediaimplfactory.h"
39 39
40#if LL_GSTREAMER_ENABLED 40///#if LL_GSTREAMER_ENABLED
41 41
42extern "C" { 42extern "C" {
43#include <stdio.h> 43#include <stdio.h>
44#include <gst/gst.h> 44#include <gst/gst.h>
45 45#include <apr_pools.h>
46#include "apr_pools.h" 46#include <apr_dso.h>
47#include "apr_dso.h"
48} 47}
49 48
50#include "llmediaimplgstreamervidplug.h" 49#include "llmediaimplgstreamervidplug.h"
@@ -100,9 +99,11 @@ class LLMediaImplGStreamer:
100 GMainLoop *mPump; // event pump for this media 99 GMainLoop *mPump; // event pump for this media
101 GstElement *mPlaybin; 100 GstElement *mPlaybin;
102 GstSLVideo *mVideoSink; 101 GstSLVideo *mVideoSink;
102 GstState mState;
103#ifdef LL_GST_SOUNDSINK 103#ifdef LL_GST_SOUNDSINK
104 GstSLSound *mAudioSink; 104 GstSLSound *mAudioSink;
105#endif // LL_GST_SOUNDSINK 105#endif // LL_GST_SOUNDSINK
106 GstState getState() const { return mState; }
106}; 107};
107 108
108class LLMediaImplGStreamerMaker : public LLMediaImplMaker 109class LLMediaImplGStreamerMaker : public LLMediaImplMaker
@@ -129,6 +130,6 @@ public:
129#define WARNMSG STDERRMSG 130#define WARNMSG STDERRMSG
130///////////////////////////////////////////////////////////////////////// 131/////////////////////////////////////////////////////////////////////////
131 132
132#endif // LL_GSTREAMER_ENABLED 133///#endif // LL_GSTREAMER_ENABLED
133 134
134#endif // llmediaimplgstreamer_h 135///#endif // llmediaimplgstreamer_h
diff --git a/linden/indra/llmedia/llmediaimplgstreamer_syms.cpp b/linden/indra/llmedia/llmediaimplgstreamer_syms.cpp
index e81d886..fb1949a 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer_syms.cpp
+++ b/linden/indra/llmedia/llmediaimplgstreamer_syms.cpp
@@ -29,7 +29,7 @@
29 * $/LicenseInfo$ 29 * $/LicenseInfo$
30 */ 30 */
31 31
32#if LL_GSTREAMER_ENABLED 32///#if LL_GSTREAMER_ENABLED
33 33
34extern "C" { 34extern "C" {
35#include <gst/gst.h> 35#include <gst/gst.h>
@@ -185,4 +185,4 @@ void ungrab_gst_syms()
185} 185}
186 186
187 187
188#endif // LL_GSTREAMER_ENABLED 188///#endif // LL_GSTREAMER_ENABLED
diff --git a/linden/indra/llmedia/llmediaimplgstreamer_syms.h b/linden/indra/llmedia/llmediaimplgstreamer_syms.h
index 92d46b7..ebebd80 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer_syms.h
+++ b/linden/indra/llmedia/llmediaimplgstreamer_syms.h
@@ -31,7 +31,7 @@
31 31
32#include "linden_common.h" 32#include "linden_common.h"
33 33
34#if LL_GSTREAMER_ENABLED 34///#if LL_GSTREAMER_ENABLED
35 35
36extern "C" { 36extern "C" {
37#include <gst/gst.h> 37#include <gst/gst.h>
@@ -75,4 +75,4 @@ void ungrab_gst_syms();
75// more hacks 75// more hacks
76#define LLGST_MESSAGE_TYPE_NAME(M) (llgst_message_type_get_name(GST_MESSAGE_TYPE(M))) 76#define LLGST_MESSAGE_TYPE_NAME(M) (llgst_message_type_get_name(GST_MESSAGE_TYPE(M)))
77 77
78#endif // LL_GSTREAMER_ENABLED 78///#endif // LL_GSTREAMER_ENABLED
diff --git a/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp b/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp
index f9c2f89..892c50d 100644
--- a/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp
+++ b/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp
@@ -29,7 +29,7 @@
29 * $/LicenseInfo$ 29 * $/LicenseInfo$
30 */ 30 */
31 31
32#if LL_GSTREAMER_ENABLED 32///#if LL_GSTREAMER_ENABLED
33 33
34#include "linden_common.h" 34#include "linden_common.h"
35 35
@@ -68,8 +68,10 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE (
68 GST_STATIC_CAPS (SLV_ALLCAPS) 68 GST_STATIC_CAPS (SLV_ALLCAPS)
69 ); 69 );
70 70
71GST_BOILERPLATE (GstSLVideo, gst_slvideo, GstVideoSink, 71GST_BOILERPLATE (GstSLVideo,
72 GST_TYPE_VIDEO_SINK); 72 gst_slvideo,
73 GstVideoSink,
74 GST_TYPE_VIDEO_SINK);
73 75
74static void gst_slvideo_set_property (GObject * object, guint prop_id, 76static void gst_slvideo_set_property (GObject * object, guint prop_id,
75 const GValue * value, 77 const GValue * value,
@@ -229,7 +231,8 @@ gst_slvideo_set_caps (GstBaseSink * bsink, GstCaps * caps)
229 } 231 }
230 llgst_caps_unref(intersection); 232 llgst_caps_unref(intersection);
231 233
232 int width, height; 234 int width = 0;
235 int height = 0;
233 gboolean ret; 236 gboolean ret;
234 const GValue *fps; 237 const GValue *fps;
235 const GValue *par; 238 const GValue *par;
@@ -402,10 +405,8 @@ gst_slvideo_set_property (GObject * object, guint prop_id,
402{ 405{
403 llg_return_if_fail (GST_IS_SLVIDEO (object)); 406 llg_return_if_fail (GST_IS_SLVIDEO (object));
404 407
405 switch (prop_id) { 408 if (prop_id) {
406 default:
407 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); 409 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
408 break;
409 } 410 }
410} 411}
411 412
@@ -415,10 +416,8 @@ gst_slvideo_get_property (GObject * object, guint prop_id,
415{ 416{
416 llg_return_if_fail (GST_IS_SLVIDEO (object)); 417 llg_return_if_fail (GST_IS_SLVIDEO (object));
417 418
418 switch (prop_id) { 419 if (prop_id) {
419 default:
420 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); 420 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
421 break;
422 } 421 }
423} 422}
424 423
@@ -446,10 +445,8 @@ plugin_init (GstPlugin * plugin)
446 some g++ versions buggily avoid __attribute__((constructor)) functions - 445 some g++ versions buggily avoid __attribute__((constructor)) functions -
447 so we provide an explicit plugin init function. 446 so we provide an explicit plugin init function.
448 */ 447 */
449void gst_slvideo_init_class (void)
450{
451#define PACKAGE "packagehack" 448#define PACKAGE "packagehack"
452 static GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, 449 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
453 GST_VERSION_MINOR, 450 GST_VERSION_MINOR,
454 "private-slvideoplugin", 451 "private-slvideoplugin",
455 "SL Video sink plugin", 452 "SL Video sink plugin",
@@ -457,8 +454,11 @@ void gst_slvideo_init_class (void)
457 "Second Life", 454 "Second Life",
458 "http://www.secondlife.com/"); 455 "http://www.secondlife.com/");
459#undef PACKAGE 456#undef PACKAGE
457
458void gst_slvideo_init_class (void)
459{
460 ll_gst_plugin_register_static (&gst_plugin_desc); 460 ll_gst_plugin_register_static (&gst_plugin_desc);
461 //fprintf(stderr, "\n\n\nCLASS INIT\n\n\n"); 461 //fprintf(stderr, "\n\n\nCLASS INIT\n\n\n");
462} 462}
463 463
464#endif // LL_GSTREAMER_ENABLED 464///#endif // LL_GSTREAMER_ENABLED
diff --git a/linden/indra/llmedia/llmediaimplgstreamervidplug.h b/linden/indra/llmedia/llmediaimplgstreamervidplug.h
index 27957db..026a52d 100644
--- a/linden/indra/llmedia/llmediaimplgstreamervidplug.h
+++ b/linden/indra/llmedia/llmediaimplgstreamervidplug.h
@@ -32,12 +32,13 @@
32#ifndef __GST_SLVIDEO_H__ 32#ifndef __GST_SLVIDEO_H__
33#define __GST_SLVIDEO_H__ 33#define __GST_SLVIDEO_H__
34 34
35#if LL_GSTREAMER_ENABLED 35///#if LL_GSTREAMER_ENABLED
36 36
37extern "C" { 37extern "C" {
38#include <gst/gst.h> 38#include <gst/gst.h>
39#include <gst/video/video.h> 39#include <gst/video/video.h>
40#include <gst/video/gstvideosink.h> 40#include <gst/video/gstvideosink.h>
41#include <gthread.h>
41} 42}
42 43
43G_BEGIN_DECLS 44G_BEGIN_DECLS
@@ -99,6 +100,6 @@ void gst_slvideo_init_class (void);
99 100
100G_END_DECLS 101G_END_DECLS
101 102
102#endif // LL_GSTREAMER_ENABLED 103///#endif // LL_GSTREAMER_ENABLED
103 104
104#endif /* __GST_SLVIDEO_H__ */ 105#endif /* __GST_SLVIDEO_H__ */
diff --git a/linden/indra/llmedia/llmediamanager.cpp b/linden/indra/llmedia/llmediamanager.cpp
index 16c731f..5394b62 100644
--- a/linden/indra/llmedia/llmediamanager.cpp
+++ b/linden/indra/llmedia/llmediamanager.cpp
@@ -40,6 +40,7 @@
40# include "llmediaimplllmozlib.h" 40# include "llmediaimplllmozlib.h"
41#endif 41#endif
42 42
43#include "llerror.h"
43LLMediaManager* LLMediaManager::sInstance = 0; 44LLMediaManager* LLMediaManager::sInstance = 0;
44 45
45 46
@@ -75,6 +76,7 @@ void LLMediaManager::initClass( LLMediaManagerData* init_data )
75 if ( ! sInstance ) 76 if ( ! sInstance )
76 sInstance = new LLMediaManager(); 77 sInstance = new LLMediaManager();
77 78
79 LL_DEBUGS("MediaManager") << "LLMediaManager::initClass" << LL_ENDL;
78 // Initialize impl classes here - this breaks the encapsulation model 80 // Initialize impl classes here - this breaks the encapsulation model
79 // but some of the initialization takes a long time and we only want to 81 // but some of the initialization takes a long time and we only want to
80 // do it once at app startup before any of the impls have been created 82 // do it once at app startup before any of the impls have been created
@@ -84,12 +86,14 @@ void LLMediaManager::initClass( LLMediaManagerData* init_data )
84 LLMediaImplExample2::startup( init_data ); 86 LLMediaImplExample2::startup( init_data );
85 87
86#if LL_QUICKTIME_ENABLED 88#if LL_QUICKTIME_ENABLED
89 LL_DEBUGS("MediaManager") << "LLMediaManager::initClass: starting quicktime." << LL_ENDL;
87 LLMediaImplQuickTime::startup( init_data ); 90 LLMediaImplQuickTime::startup( init_data );
88#endif // LL_QUICKTIME_ENABLED 91#endif // LL_QUICKTIME_ENABLED
89 92
90#if LL_GSTREAMER_ENABLED 93///#if LL_GSTREAMER_ENABLED
94 LL_DEBUGS("MediaManager") << "LLMediaManager::initClass: starting gstreamer" << LL_ENDL;
91 LLMediaImplGStreamer::startup( init_data ); 95 LLMediaImplGStreamer::startup( init_data );
92#endif // LL_GSTREAMER_ENABLED 96///#endif // LL_GSTREAMER_ENABLED
93} 97}
94 98
95//////////////////////////////////////////////////////////////////////////////// 99////////////////////////////////////////////////////////////////////////////////
@@ -129,9 +133,9 @@ void LLMediaManager::cleanupClass()
129 LLMediaImplQuickTime::closedown(); 133 LLMediaImplQuickTime::closedown();
130#endif // LL_QUICKTIME_ENABLED 134#endif // LL_QUICKTIME_ENABLED
131 135
132#if LL_GSTREAMER_ENABLED 136///#if LL_GSTREAMER_ENABLED
133 LLMediaImplGStreamer::closedown(); 137 LLMediaImplGStreamer::closedown();
134#endif // LL_QUICKTIME_ENABLED 138///#endif // LL_QUICKTIME_ENABLED
135 139
136 if ( sInstance ) 140 if ( sInstance )
137 delete sInstance; 141 delete sInstance;
diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp
index 12d1929..9c8ee94 100644
--- a/linden/indra/llui/lllineeditor.cpp
+++ b/linden/indra/llui/lllineeditor.cpp
@@ -41,6 +41,7 @@
41#include "llgl.h" 41#include "llgl.h"
42#include "lltimer.h" 42#include "lltimer.h"
43 43
44#include "llcalc.h"
44//#include "llclipboard.h" 45//#include "llclipboard.h"
45#include "llcontrol.h" 46#include "llcontrol.h"
46#include "llbutton.h" 47#include "llbutton.h"
@@ -129,6 +130,7 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect,
129 mDrawAsterixes( FALSE ), 130 mDrawAsterixes( FALSE ),
130 mHandleEditKeysDirectly( FALSE ), 131 mHandleEditKeysDirectly( FALSE ),
131 mSelectAllonFocusReceived( FALSE ), 132 mSelectAllonFocusReceived( FALSE ),
133 mSelectAllonCommit( TRUE ),
132 mPassDelete(FALSE), 134 mPassDelete(FALSE),
133 mReadOnly(FALSE), 135 mReadOnly(FALSE),
134 mImage( sImage ), 136 mImage( sImage ),
@@ -226,7 +228,10 @@ void LLLineEditor::onCommit()
226 updateHistory(); 228 updateHistory();
227 229
228 LLUICtrl::onCommit(); 230 LLUICtrl::onCommit();
229 selectAll(); 231
232 // Selection on commit needs to be turned off when evaluating maths
233 // expressions, to allow indication of the error position
234 if (mSelectAllonCommit) selectAll();
230} 235}
231 236
232 237
@@ -2082,6 +2087,32 @@ BOOL LLLineEditor::prevalidateASCII(const LLWString &str)
2082 return rv; 2087 return rv;
2083} 2088}
2084 2089
2090BOOL LLLineEditor::evaluateFloat()
2091{
2092 bool success;
2093 F32 result = 0.f;
2094 std::string expr = getText();
2095
2096 success = LLCalc::getInstance()->evalString(expr, result);
2097
2098 if (!success)
2099 {
2100 // Move the cursor to near the error on failure
2101 setCursor(LLCalc::getInstance()->getLastErrorPos());
2102 // *TODO: Translated error message indicating the type of error? Select error text?
2103 }
2104 else
2105 {
2106 // Replace the expression with the result
2107 std::ostringstream result_str;
2108 result_str << result;
2109 setText(result_str.str());
2110 selectAll();
2111 }
2112
2113 return success;
2114}
2115
2085void LLLineEditor::onMouseCaptureLost() 2116void LLLineEditor::onMouseCaptureLost()
2086{ 2117{
2087 endSelection(); 2118 endSelection();
diff --git a/linden/indra/llui/lllineeditor.h b/linden/indra/llui/lllineeditor.h
index 09a240b..6738151 100644
--- a/linden/indra/llui/lllineeditor.h
+++ b/linden/indra/llui/lllineeditor.h
@@ -188,6 +188,7 @@ public:
188 188
189 void setHandleEditKeysDirectly( BOOL b ) { mHandleEditKeysDirectly = b; } 189 void setHandleEditKeysDirectly( BOOL b ) { mHandleEditKeysDirectly = b; }
190 void setSelectAllonFocusReceived(BOOL b); 190 void setSelectAllonFocusReceived(BOOL b);
191 void setSelectAllonCommit(BOOL b) { mSelectAllonCommit = b; }
191 192
192 void setKeystrokeCallback(void (*keystroke_callback)(LLLineEditor* caller, void* user_data)); 193 void setKeystrokeCallback(void (*keystroke_callback)(LLLineEditor* caller, void* user_data));
193 194
@@ -208,6 +209,8 @@ public:
208 static BOOL prevalidateASCII(const LLWString &str); 209 static BOOL prevalidateASCII(const LLWString &str);
209 210
210 static BOOL postvalidateFloat(const std::string &str); 211 static BOOL postvalidateFloat(const std::string &str);
212
213 BOOL evaluateFloat();
211 214
212 // line history support: 215 // line history support:
213 void setEnableLineHistory( BOOL enabled ) { mHaveHistory = enabled; } // switches line history on or off 216 void setEnableLineHistory( BOOL enabled ) { mHaveHistory = enabled; } // switches line history on or off
@@ -297,6 +300,7 @@ protected:
297 300
298 BOOL mHandleEditKeysDirectly; // If true, the standard edit keys (Ctrl-X, Delete, etc,) are handled here instead of routed by the menu system 301 BOOL mHandleEditKeysDirectly; // If true, the standard edit keys (Ctrl-X, Delete, etc,) are handled here instead of routed by the menu system
299 BOOL mSelectAllonFocusReceived; 302 BOOL mSelectAllonFocusReceived;
303 BOOL mSelectAllonCommit;
300 BOOL mPassDelete; 304 BOOL mPassDelete;
301 305
302 BOOL mReadOnly; 306 BOOL mReadOnly;
diff --git a/linden/indra/llui/llspinctrl.cpp b/linden/indra/llui/llspinctrl.cpp
index a106af4..b12d095 100644
--- a/linden/indra/llui/llspinctrl.cpp
+++ b/linden/indra/llui/llspinctrl.cpp
@@ -49,7 +49,7 @@
49#include "llfocusmgr.h" 49#include "llfocusmgr.h"
50#include "llresmgr.h" 50#include "llresmgr.h"
51 51
52const U32 MAX_STRING_LENGTH = 32; 52const U32 MAX_STRING_LENGTH = 255;
53 53
54static LLRegisterWidget<LLSpinCtrl> r2("spinner"); 54static LLRegisterWidget<LLSpinCtrl> r2("spinner");
55 55
@@ -123,7 +123,7 @@ LLSpinCtrl::LLSpinCtrl( const std::string& name, const LLRect& rect, const std::
123 mEditor = new LLLineEditor( std::string("SpinCtrl Editor"), editor_rect, LLStringUtil::null, font, 123 mEditor = new LLLineEditor( std::string("SpinCtrl Editor"), editor_rect, LLStringUtil::null, font,
124 MAX_STRING_LENGTH, 124 MAX_STRING_LENGTH,
125 &LLSpinCtrl::onEditorCommit, NULL, NULL, this, 125 &LLSpinCtrl::onEditorCommit, NULL, NULL, this,
126 &LLLineEditor::prevalidateFloat ); 126 &LLLineEditor::prevalidateASCII );
127 mEditor->setFollowsLeft(); 127 mEditor->setFollowsLeft();
128 mEditor->setFollowsBottom(); 128 mEditor->setFollowsBottom();
129 mEditor->setFocusReceivedCallback( &LLSpinCtrl::onEditorGainFocus, this ); 129 mEditor->setFocusReceivedCallback( &LLSpinCtrl::onEditorGainFocus, this );
@@ -132,6 +132,7 @@ LLSpinCtrl::LLSpinCtrl( const std::string& name, const LLRect& rect, const std::
132 // it's easier to understand 132 // it's easier to understand
133 //mEditor->setSelectAllonFocusReceived(TRUE); 133 //mEditor->setSelectAllonFocusReceived(TRUE);
134 mEditor->setIgnoreTab(TRUE); 134 mEditor->setIgnoreTab(TRUE);
135 mEditor->setSelectAllonCommit(FALSE);
135 addChild(mEditor); 136 addChild(mEditor);
136 137
137 updateEditor(); 138 updateEditor();
@@ -292,9 +293,10 @@ void LLSpinCtrl::onEditorCommit( LLUICtrl* caller, void *userdata )
292 LLSpinCtrl* self = (LLSpinCtrl*) userdata; 293 LLSpinCtrl* self = (LLSpinCtrl*) userdata;
293 llassert( caller == self->mEditor ); 294 llassert( caller == self->mEditor );
294 295
295 std::string text = self->mEditor->getText(); 296 if( self->mEditor->evaluateFloat() )
296 if( LLLineEditor::postvalidateFloat( text ) )
297 { 297 {
298 std::string text = self->mEditor->getText();
299
298 LLLocale locale(LLLocale::USER_LOCALE); 300 LLLocale locale(LLLocale::USER_LOCALE);
299 F32 val = (F32) atof(text.c_str()); 301 F32 val = (F32) atof(text.c_str());
300 302
@@ -322,9 +324,12 @@ void LLSpinCtrl::onEditorCommit( LLUICtrl* caller, void *userdata )
322 success = TRUE; 324 success = TRUE;
323 } 325 }
324 } 326 }
325 self->updateEditor();
326 327
327 if( !success ) 328 if( success )
329 {
330 self->updateEditor();
331 }
332 else
328 { 333 {
329 self->reportInvalidData(); 334 self->reportInvalidData();
330 } 335 }
diff --git a/linden/indra/llwindow/llwindowsdl.cpp b/linden/indra/llwindow/llwindowsdl.cpp
index f0acee5..0cff44f 100644
--- a/linden/indra/llwindow/llwindowsdl.cpp
+++ b/linden/indra/llwindow/llwindowsdl.cpp
@@ -123,9 +123,9 @@ BOOL ll_try_gtk_init(void)
123 if (!tried_gtk_init) 123 if (!tried_gtk_init)
124 { 124 {
125 tried_gtk_init = TRUE; 125 tried_gtk_init = TRUE;
126#if LL_GSTREAMER_ENABLED 126///#if LL_GSTREAMER_ENABLED
127 if (!g_thread_supported ()) g_thread_init (NULL); 127 if (!g_thread_supported ()) g_thread_init (NULL);
128#endif // LL_GSTREAMER_ENABLED 128///#endif // LL_GSTREAMER_ENABLED
129 maybe_lock_display(); 129 maybe_lock_display();
130 gtk_is_good = gtk_init_check(NULL, NULL); 130 gtk_is_good = gtk_init_check(NULL, NULL);
131 maybe_unlock_display(); 131 maybe_unlock_display();
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt
index ddf6897..0205ceb 100644
--- a/linden/indra/newview/CMakeLists.txt
+++ b/linden/indra/newview/CMakeLists.txt
@@ -8,6 +8,7 @@ include(BuildVersion)
8include(DirectX) 8include(DirectX)
9include(ELFIO) 9include(ELFIO)
10include(FMOD) 10include(FMOD)
11include(OPENAL)
11include(FindOpenGL) 12include(FindOpenGL)
12include(LLAudio) 13include(LLAudio)
13include(LLCharacter) 14include(LLCharacter)
@@ -31,7 +32,6 @@ include(NDOF)
31include(TemplateCheck) 32include(TemplateCheck)
32include(UI) 33include(UI)
33include(UnixInstall) 34include(UnixInstall)
34include(LLKDU)
35include(ViewerMiscLibs) 35include(ViewerMiscLibs)
36 36
37if (WINDOWS) 37if (WINDOWS)
@@ -56,6 +56,7 @@ include_directories(
56 ${LLXML_INCLUDE_DIRS} 56 ${LLXML_INCLUDE_DIRS}
57 ${LSCRIPT_INCLUDE_DIRS} 57 ${LSCRIPT_INCLUDE_DIRS}
58 ${LSCRIPT_INCLUDE_DIRS}/lscript_compile 58 ${LSCRIPT_INCLUDE_DIRS}/lscript_compile
59 ${GSTREAMER_INCLUDE_DIRS}
59 ) 60 )
60 61
61set(viewer_SOURCE_FILES 62set(viewer_SOURCE_FILES
@@ -430,6 +431,9 @@ set(viewer_SOURCE_FILES
430 pipeline.cpp 431 pipeline.cpp
431 ) 432 )
432 433
434set(VIEWER_BINARY_NAME "imprudence-bin" CACHE STRING
435 "The name of the viewer executable to create.")
436
433if (LINUX) 437if (LINUX)
434 # We can't set these flags for Darwin, because they get passed to 438 # We can't set these flags for Darwin, because they get passed to
435 # the PPC compiler. Ugh. 439 # the PPC compiler. Ugh.
@@ -850,8 +854,8 @@ if (DARWIN)
850 secondlife.icns 854 secondlife.icns
851 macview.r 855 macview.r
852 gpu_table.txt 856 gpu_table.txt
853 Info-SecondLife.plist 857 Info-Imprudence.plist
854 SecondLife.nib/ 858 Imprudence.nib/
855 # CMake doesn't seem to support Xcode language variants well just yet 859 # CMake doesn't seem to support Xcode language variants well just yet
856 English.lproj/InfoPlist.strings 860 English.lproj/InfoPlist.strings
857 English.lproj/language.txt 861 English.lproj/language.txt
@@ -1239,8 +1243,13 @@ set_source_files_properties(${viewer_CHARACTER_FILES}
1239 1243
1240list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES}) 1244list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES})
1241 1245
1246
1247if (OPENAL)
1248 set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_OPENAL")
1249endif (OPENAL)
1250
1242if (FMOD) 1251if (FMOD)
1243 set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS -DLL_FMOD) 1252 set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMOD")
1244 1253
1245 if (NOT WINDOWS) 1254 if (NOT WINDOWS)
1246 set(fmodwrapper_SOURCE_FILES fmodwrapper.cpp) 1255 set(fmodwrapper_SOURCE_FILES fmodwrapper.cpp)
@@ -1260,6 +1269,8 @@ if (FMOD)
1260 endif (NOT WINDOWS) 1269 endif (NOT WINDOWS)
1261endif (FMOD) 1270endif (FMOD)
1262 1271
1272set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}")
1273
1263list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES}) 1274list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES})
1264 1275
1265set_source_files_properties(${viewer_HEADER_FILES} 1276set_source_files_properties(${viewer_HEADER_FILES}
@@ -1272,10 +1283,6 @@ add_executable(imprudence-bin
1272 ) 1283 )
1273check_message_template(imprudence-bin) 1284check_message_template(imprudence-bin)
1274 1285
1275if (LLKDU_LIBRARY)
1276 add_dependencies(imprudence-bin ${LLKDU_LIBRARY})
1277endif (LLKDU_LIBRARY)
1278
1279set(PACKAGE OFF CACHE BOOL 1286set(PACKAGE OFF CACHE BOOL
1280 "Add a package target that builds an installer package.") 1287 "Add a package target that builds an installer package.")
1281 1288
@@ -1467,24 +1474,27 @@ if (DARWIN)
1467 ) 1474 )
1468 1475
1469 if (PACKAGE) 1476 if (PACKAGE)
1470 add_custom_target(package 1477 add_custom_target(package ALL DEPENDS imprudence-bin)
1471 COMMAND
1472 ${PYTHON_EXECUTABLE}
1473 ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
1474 --grid=${GRID}
1475 --configuration=${CMAKE_CFG_INTDIR}
1476 --channel=${VIEWER_CHANNEL}
1477 --login_channel=${VIEWER_CHANNEL}
1478 --source=${CMAKE_CURRENT_SOURCE_DIR}
1479 --artwork=${ARTWORK_DIR}
1480 --build=${CMAKE_CURRENT_BINARY_DIR}
1481 --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app
1482 --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
1483 DEPENDS
1484 imprudence-bin
1485 ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
1486 )
1487 add_dependencies(package mac-updater mac-crash-logger) 1478 add_dependencies(package mac-updater mac-crash-logger)
1479
1480 add_custom_command(
1481 TARGET package POST_BUILD
1482 COMMAND ${PYTHON_EXECUTABLE}
1483 ARGS
1484 ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
1485 --grid=${GRID}
1486 --configuration=${CMAKE_CFG_INTDIR}
1487 --channel=${VIEWER_CHANNEL}
1488 --login_channel=${VIEWER_LOGIN_CHANNEL}
1489 --source=${CMAKE_CURRENT_SOURCE_DIR}
1490 --artwork=${ARTWORK_DIR}
1491 --build=${CMAKE_CURRENT_BINARY_DIR}
1492 --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app
1493 --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
1494 DEPENDS
1495 ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
1496 )
1497
1488 endif (PACKAGE) 1498 endif (PACKAGE)
1489endif (DARWIN) 1499endif (DARWIN)
1490 1500
diff --git a/linden/indra/newview/app_settings/logcontrol.xml b/linden/indra/newview/app_settings/logcontrol.xml
index d7bb64c..f3b08f9 100644
--- a/linden/indra/newview/app_settings/logcontrol.xml
+++ b/linden/indra/newview/app_settings/logcontrol.xml
@@ -40,6 +40,13 @@
40 </array> 40 </array>
41 <key>tags</key> 41 <key>tags</key>
42 <array> 42 <array>
43 <string>OpenAL</string>
44 <string>AudioEngine</string>
45 <string>MediaImpl</string>
46 <string>MediaInfo</string>
47 <string>MediaCallback</string>
48 <string>MediaBuffering</string>
49 <string>MediaState</string>
43 </array> 50 </array>
44 </map> 51 </map>
45 </array> 52 </array>
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index ca3dd81..01f6add 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -1849,17 +1849,6 @@
1849 <integer>0</integer> 1849 <integer>0</integer>
1850 </array> 1850 </array>
1851 </map> 1851 </map>
1852 <key>CompressSnapshotsToDisk</key>
1853 <map>
1854 <key>Comment</key>
1855 <string>Compress snapshots saved to disk (Using JPEG 2000)</string>
1856 <key>Persist</key>
1857 <integer>1</integer>
1858 <key>Type</key>
1859 <string>Boolean</string>
1860 <key>Value</key>
1861 <integer>0</integer>
1862 </map>
1863 <key>ConnectAsGod</key> 1852 <key>ConnectAsGod</key>
1864 <map> 1853 <map>
1865 <key>Comment</key> 1854 <key>Comment</key>
@@ -4387,7 +4376,7 @@
4387 <key>Type</key> 4376 <key>Type</key>
4388 <string>Boolean</string> 4377 <string>Boolean</string>
4389 <key>Value</key> 4378 <key>Value</key>
4390 <integer>0</integer> 4379 <integer>1</integer>
4391 </map> 4380 </map>
4392 <key>LipSyncOoh</key> 4381 <key>LipSyncOoh</key>
4393 <map> 4382 <map>
@@ -4730,6 +4719,17 @@
4730 <key>Value</key> 4719 <key>Value</key>
4731 <integer>1</integer> 4720 <integer>1</integer>
4732 </map> 4721 </map>
4722 <key>MiniMapTeleport</key>
4723 <map>
4724 <key>Comment</key>
4725 <string>Teleport on Mini-Map double click </string>
4726 <key>Persist</key>
4727 <integer>1</integer>
4728 <key>Type</key>
4729 <string>Boolean</string>
4730 <key>Value</key>
4731 <integer>1</integer>
4732 </map>
4733 <key>MiniMapScale</key> 4733 <key>MiniMapScale</key>
4734 <map> 4734 <map>
4735 <key>Comment</key> 4735 <key>Comment</key>
@@ -4820,7 +4820,7 @@
4820 <key>MuteAmbient</key> 4820 <key>MuteAmbient</key>
4821 <map> 4821 <map>
4822 <key>Comment</key> 4822 <key>Comment</key>
4823 <string>Ambient sound effects, such as wind noise, play at 0 volume</string> 4823 <string>Ambient sound effects, play at 0 volume</string>
4824 <key>Persist</key> 4824 <key>Persist</key>
4825 <integer>1</integer> 4825 <integer>1</integer>
4826 <key>Type</key> 4826 <key>Type</key>
@@ -4905,6 +4905,17 @@
4905 <key>Value</key> 4905 <key>Value</key>
4906 <integer>1</integer> 4906 <integer>1</integer>
4907 </map> 4907 </map>
4908 <key>MuteWind</key>
4909 <map>
4910 <key>Comment</key>
4911 <string>Mute inworld wind generation</string>
4912 <key>Persist</key>
4913 <integer>1</integer>
4914 <key>Type</key>
4915 <string>Boolean</string>
4916 <key>Value</key>
4917 <integer>1</integer>
4918 </map>
4908 <key>NewCacheLocation</key> 4919 <key>NewCacheLocation</key>
4909 <map> 4920 <map>
4910 <key>Comment</key> 4921 <key>Comment</key>
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 14214b5..9e68078 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -109,6 +109,7 @@
109#include "llpostprocess.h" 109#include "llpostprocess.h"
110#include "llwlparammanager.h" 110#include "llwlparammanager.h"
111#include "llwaterparammanager.h" 111#include "llwaterparammanager.h"
112#include "llcalc.h"
112 113
113#include "lldebugview.h" 114#include "lldebugview.h"
114#include "llconsole.h" 115#include "llconsole.h"
@@ -1176,10 +1177,13 @@ bool LLAppViewer::cleanup()
1176 LLNotifyBox::cleanup(); 1177 LLNotifyBox::cleanup();
1177 1178
1178 LLWorldMap::getInstance()->reset(); // release any images 1179 LLWorldMap::getInstance()->reset(); // release any images
1180
1181 LLCalc::cleanUp();
1179 1182
1180 llinfos << "Global stuff deleted" << llendflush; 1183 llinfos << "Global stuff deleted" << llendflush;
1181 1184
1182#if !LL_RELEASE_FOR_DOWNLOAD 1185#if (!defined(LL_FMOD)) || (!LL_RELEASE_FOR_DOWNLOAD)
1186 // OpenAL likes to crash on exit if we *don't* explicitly shut it down.
1183 if (gAudiop) 1187 if (gAudiop)
1184 { 1188 {
1185 gAudiop->shutdown(); 1189 gAudiop->shutdown();
@@ -1601,7 +1605,7 @@ bool LLAppViewer::initConfiguration()
1601 1605
1602 // - set procedural settings 1606 // - set procedural settings
1603 gSavedSettings.setString("ClientSettingsFile", 1607 gSavedSettings.setString("ClientSettingsFile",
1604 gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFileName("Global"))); 1608 gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings_imprudence.xml"));
1605 1609
1606 gSavedSettings.setString("VersionChannelName", IMP_VIEWER_NAME); 1610 gSavedSettings.setString("VersionChannelName", IMP_VIEWER_NAME);
1607 1611
diff --git a/linden/indra/newview/llaudiosourcevo.cpp b/linden/indra/newview/llaudiosourcevo.cpp
index e668078..9c25d94 100644
--- a/linden/indra/newview/llaudiosourcevo.cpp
+++ b/linden/indra/newview/llaudiosourcevo.cpp
@@ -39,7 +39,7 @@
39#include "llviewerparcelmgr.h" 39#include "llviewerparcelmgr.h"
40 40
41LLAudioSourceVO::LLAudioSourceVO(const LLUUID &sound_id, const LLUUID& owner_id, const F32 gain, LLViewerObject *objectp) 41LLAudioSourceVO::LLAudioSourceVO(const LLUUID &sound_id, const LLUUID& owner_id, const F32 gain, LLViewerObject *objectp)
42: LLAudioSource(sound_id, owner_id, gain), 42: LLAudioSource(sound_id, owner_id, gain, LLAudioEngine::AUDIO_TYPE_SFX),
43 mObjectp(objectp), 43 mObjectp(objectp),
44 mActualGain(gain) 44 mActualGain(gain)
45{ 45{
diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp
index af436c5..4953410 100644
--- a/linden/indra/newview/llfloaterabout.cpp
+++ b/linden/indra/newview/llfloaterabout.cpp
@@ -41,6 +41,7 @@
41 41
42#include "llcurl.h" 42#include "llcurl.h"
43#include "llimagej2c.h" 43#include "llimagej2c.h"
44#include "audioengine.h"
44 45
45#include "llviewertexteditor.h" 46#include "llviewertexteditor.h"
46#include "llviewercontrol.h" 47#include "llviewercontrol.h"
@@ -200,6 +201,10 @@ LLFloaterAbout::LLFloaterAbout()
200 support.append( LLImageJ2C::getEngineInfo() ); 201 support.append( LLImageJ2C::getEngineInfo() );
201 support.append("\n"); 202 support.append("\n");
202 203
204 support.append("Audio Driver Version: ");
205 support.append( gAudiop ? gAudiop->getDriverName(true) : "(none)" );
206 support.append("\n");
207
203 LLMediaManager *mgr = LLMediaManager::getInstance(); 208 LLMediaManager *mgr = LLMediaManager::getInstance();
204 if (mgr) 209 if (mgr)
205 { 210 {
diff --git a/linden/indra/newview/llfloatersnapshot.cpp b/linden/indra/newview/llfloatersnapshot.cpp
index 954bf9f..6e66103 100644
--- a/linden/indra/newview/llfloatersnapshot.cpp
+++ b/linden/indra/newview/llfloatersnapshot.cpp
@@ -992,6 +992,7 @@ public:
992 static void onClickLess(void* data) ; 992 static void onClickLess(void* data) ;
993 static void onClickMore(void* data) ; 993 static void onClickMore(void* data) ;
994 static void onClickUICheck(LLUICtrl *ctrl, void* data); 994 static void onClickUICheck(LLUICtrl *ctrl, void* data);
995 static void onClickHighResCheck(LLUICtrl *ctrl, void* data);
995 static void onClickHUDCheck(LLUICtrl *ctrl, void* data); 996 static void onClickHUDCheck(LLUICtrl *ctrl, void* data);
996 static void onClickKeepOpenCheck(LLUICtrl *ctrl, void* data); 997 static void onClickKeepOpenCheck(LLUICtrl *ctrl, void* data);
997 static void onClickKeepAspectCheck(LLUICtrl *ctrl, void* data); 998 static void onClickKeepAspectCheck(LLUICtrl *ctrl, void* data);
@@ -1105,6 +1106,10 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp)
1105{ 1106{
1106 LLSnapshotLivePreview* previewp = getPreviewView(floaterp); 1107 LLSnapshotLivePreview* previewp = getPreviewView(floaterp);
1107 1108
1109 LLSnapshotLivePreview::ESnapshotType shot_type = getTypeIndex(floaterp);
1110 if (shot_type != LLSnapshotLivePreview::SNAPSHOT_LOCAL)
1111 gSavedSettings.setBOOL("HighResSnapshot", FALSE);
1112
1108 S32 delta_height = gSavedSettings.getBOOL("AdvanceSnapshot") ? 0 : floaterp->getUIWinHeightShort() - floaterp->getUIWinHeightLong() ; 1113 S32 delta_height = gSavedSettings.getBOOL("AdvanceSnapshot") ? 0 : floaterp->getUIWinHeightShort() - floaterp->getUIWinHeightLong() ;
1109 1114
1110 LLComboBox* combo; 1115 LLComboBox* combo;
@@ -1234,6 +1239,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
1234 floater->childSetVisible("snapshot_height", is_advance); 1239 floater->childSetVisible("snapshot_height", is_advance);
1235 floater->childSetVisible("keep_aspect_check", is_advance); 1240 floater->childSetVisible("keep_aspect_check", is_advance);
1236 floater->childSetVisible("ui_check", is_advance); 1241 floater->childSetVisible("ui_check", is_advance);
1242 floater->childSetVisible("high_res_check", is_advance && is_local);
1237 floater->childSetVisible("hud_check", is_advance); 1243 floater->childSetVisible("hud_check", is_advance);
1238 floater->childSetVisible("keep_open_check", is_advance); 1244 floater->childSetVisible("keep_open_check", is_advance);
1239 floater->childSetVisible("freeze_frame_check", is_advance); 1245 floater->childSetVisible("freeze_frame_check", is_advance);
@@ -1246,7 +1252,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
1246 layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; 1252 layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR;
1247 floater->childSetValue("layer_types", "colors"); 1253 floater->childSetValue("layer_types", "colors");
1248 if(is_advance) 1254 if(is_advance)
1249 { 1255 {
1250 setResolution(floater, "postcard_size_combo"); 1256 setResolution(floater, "postcard_size_combo");
1251 } 1257 }
1252 break; 1258 break;
@@ -1434,7 +1440,26 @@ void LLFloaterSnapshot::Impl::onClickUICheck(LLUICtrl *ctrl, void* data)
1434 1440
1435 LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; 1441 LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
1436 if (view) 1442 if (view)
1443 {
1444 BOOL high_res_snapshot = gSavedSettings.getBOOL("HighResSnapshot");
1445 if (high_res_snapshot) gSavedSettings.setBOOL("HighResSnapshot", FALSE);
1446 view->childSetEnabled("high_res_check", !check->get());
1447 checkAutoSnapshot(getPreviewView(view), TRUE);
1448 }
1449}
1450
1451// static
1452void LLFloaterSnapshot::Impl::onClickHighResCheck(LLUICtrl *ctrl, void* data)
1453{
1454 LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl;
1455 gSavedSettings.setBOOL( "HighResSnapshot", check->get() );
1456
1457 LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
1458 if (view)
1437 { 1459 {
1460 BOOL ui_in_snapshot = gSavedSettings.getBOOL("RenderUIInSnapshot");
1461 if (ui_in_snapshot) gSavedSettings.setBOOL("RenderUIInSnapshot", FALSE);
1462 view->childSetEnabled("ui_check", !check->get());
1438 checkAutoSnapshot(getPreviewView(view), TRUE); 1463 checkAutoSnapshot(getPreviewView(view), TRUE);
1439 } 1464 }
1440} 1465}
@@ -1912,6 +1937,9 @@ BOOL LLFloaterSnapshot::postBuild()
1912 1937
1913 childSetCommitCallback("ui_check", Impl::onClickUICheck, this); 1938 childSetCommitCallback("ui_check", Impl::onClickUICheck, this);
1914 1939
1940 childSetCommitCallback("high_res_check", Impl::onClickHighResCheck, this);
1941 childSetValue("high_res_check", gSavedSettings.getBOOL("HighResSnapshot"));
1942
1915 childSetCommitCallback("hud_check", Impl::onClickHUDCheck, this); 1943 childSetCommitCallback("hud_check", Impl::onClickHUDCheck, this);
1916 childSetValue("hud_check", gSavedSettings.getBOOL("RenderHUDInSnapshot")); 1944 childSetValue("hud_check", gSavedSettings.getBOOL("RenderHUDInSnapshot"));
1917 1945
@@ -2001,8 +2029,23 @@ void LLFloaterSnapshot::draw()
2001 childSetEnabled("send_btn", FALSE); 2029 childSetEnabled("send_btn", FALSE);
2002 childSetEnabled("save_btn", FALSE); 2030 childSetEnabled("save_btn", FALSE);
2003 } 2031 }
2004 2032
2005 BOOL ui_in_snapshot = gSavedSettings.getBOOL("RenderUIInSnapshot"); 2033 BOOL ui_in_snapshot = gSavedSettings.getBOOL("RenderUIInSnapshot");
2034
2035 if (previewp->getSnapshotType() != LLSnapshotLivePreview::SNAPSHOT_LOCAL)
2036 {
2037 childSetValue("high_res_check", FALSE);
2038 childSetEnabled("ui_check", TRUE);
2039 }
2040 else
2041 {
2042 if (ui_in_snapshot)
2043 {
2044 gSavedSettings.setBOOL("HighResSnapshot", FALSE);
2045 childSetEnabled("high_res_check", FALSE);
2046 }
2047 }
2048
2006 childSetValue("ui_check", ui_in_snapshot); 2049 childSetValue("ui_check", ui_in_snapshot);
2007 childSetToolTip("ui_check", std::string("If selected shows the UI in the snapshot")); 2050 childSetToolTip("ui_check", std::string("If selected shows the UI in the snapshot"));
2008 } 2051 }
diff --git a/linden/indra/newview/llfloaterworldmap.cpp b/linden/indra/newview/llfloaterworldmap.cpp
index b56bfcb..8396454 100644
--- a/linden/indra/newview/llfloaterworldmap.cpp
+++ b/linden/indra/newview/llfloaterworldmap.cpp
@@ -743,7 +743,7 @@ void LLFloaterWorldMap::updateLocation()
743void LLFloaterWorldMap::trackURL(const std::string& region_name, S32 x_coord, S32 y_coord, S32 z_coord) 743void LLFloaterWorldMap::trackURL(const std::string& region_name, S32 x_coord, S32 y_coord, S32 z_coord)
744{ 744{
745 LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromName(region_name); 745 LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromName(region_name);
746 z_coord = llclamp(z_coord, 0, 1000); 746 z_coord = llclamp(z_coord, 0, 4096);
747 if (sim_info) 747 if (sim_info)
748 { 748 {
749 LLVector3 local_pos; 749 LLVector3 local_pos;
diff --git a/linden/indra/newview/llmaniptranslate.h b/linden/indra/newview/llmaniptranslate.h
index 7784860..383f4da 100644
--- a/linden/indra/newview/llmaniptranslate.h
+++ b/linden/indra/newview/llmaniptranslate.h
@@ -113,7 +113,7 @@ private:
113 LLVector3d mDragCursorStartGlobal; 113 LLVector3d mDragCursorStartGlobal;
114 LLVector3d mDragSelectionStartGlobal; 114 LLVector3d mDragSelectionStartGlobal;
115 LLTimer mUpdateTimer; 115 LLTimer mUpdateTimer;
116 typedef std::set<ManipulatorHandle*, compare_manipulators> minpulator_list_t; 116 typedef std::multiset<ManipulatorHandle*, compare_manipulators> minpulator_list_t;
117 minpulator_list_t mProjectedManipulators; 117 minpulator_list_t mProjectedManipulators;
118 LLVector4 mManipulatorVertices[18]; 118 LLVector4 mManipulatorVertices[18];
119 F32 mSnapOffsetMeters; 119 F32 mSnapOffsetMeters;
diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp
index 22dee9d..ee853fe 100644
--- a/linden/indra/newview/llnetmap.cpp
+++ b/linden/indra/newview/llnetmap.cpp
@@ -604,9 +604,13 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rec
604 buffer = region->getHost().getString(); 604 buffer = region->getHost().getString();
605 msg.append(buffer); 605 msg.append(buffer);
606#endif 606#endif
607 // *TODO: put this under the control of XUI so it can be 607 // *TODO:
608 // translated. 608 // - put this under the control of XUI so it can be translated.
609 msg.append("\n(Double-click to open Map)"); 609
610 if ( gSavedSettings.getBOOL( "MiniMapTeleport" ))
611 msg.append("\n(Double-click to teleport)");
612 else
613 msg.append("\n(Double-click to open Map)");
610 614
611 S32 SLOP = 4; 615 S32 SLOP = 4;
612 localPointToScreen( 616 localPointToScreen(
@@ -767,7 +771,14 @@ void LLNetMap::createObjectImage()
767 771
768BOOL LLNetMap::handleDoubleClick( S32 x, S32 y, MASK mask ) 772BOOL LLNetMap::handleDoubleClick( S32 x, S32 y, MASK mask )
769{ 773{
770 LLFloaterWorldMap::show(NULL, FALSE); 774 if (gSavedSettings.getBOOL( "MiniMapTeleport" ))
775 {
776 gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
777 gAgent.teleportViaLocation( viewPosToGlobal(x,y) );
778 }
779 else
780 LLFloaterWorldMap::show(NULL, FALSE);
781
771 return TRUE; 782 return TRUE;
772} 783}
773 784
diff --git a/linden/indra/newview/llpanelface.cpp b/linden/indra/newview/llpanelface.cpp
index 4742627..d1c34f1 100644
--- a/linden/indra/newview/llpanelface.cpp
+++ b/linden/indra/newview/llpanelface.cpp
@@ -35,6 +35,7 @@
35#include "llpanelface.h" 35#include "llpanelface.h"
36 36
37// library includes 37// library includes
38#include "llcalc.h"
38#include "llerror.h" 39#include "llerror.h"
39#include "llfocusmgr.h" 40#include "llfocusmgr.h"
40#include "llrect.h" 41#include "llrect.h"
@@ -60,6 +61,7 @@
60#include "llviewermedia.h" 61#include "llviewermedia.h"
61#include "llviewerobject.h" 62#include "llviewerobject.h"
62#include "llviewerstats.h" 63#include "llviewerstats.h"
64#include "llviewerwindow.h"
63#include "lluictrlfactory.h" 65#include "lluictrlfactory.h"
64 66
65// 67//
@@ -179,6 +181,7 @@ BOOL LLPanelFace::postBuild()
179 childSetCommitCallback("TexOffsetU",LLPanelFace::onCommitTextureInfo, this); 181 childSetCommitCallback("TexOffsetU",LLPanelFace::onCommitTextureInfo, this);
180 childSetCommitCallback("TexOffsetV",LLPanelFace::onCommitTextureInfo, this); 182 childSetCommitCallback("TexOffsetV",LLPanelFace::onCommitTextureInfo, this);
181 childSetAction("button align",onClickAutoFix,this); 183 childSetAction("button align",onClickAutoFix,this);
184 childSetAction("texture_math_constants",onClickTextureConstants,this);
182 185
183 clearCtrls(); 186 clearCtrls();
184 187
@@ -381,6 +384,7 @@ void LLPanelFace::sendTextureInfo()
381void LLPanelFace::getState() 384void LLPanelFace::getState()
382{ 385{
383 LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); 386 LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
387 LLCalc* calcp = LLCalc::getInstance();
384 388
385 if( objectp 389 if( objectp
386 && objectp->getPCode() == LL_PCODE_VOLUME 390 && objectp->getPCode() == LL_PCODE_VOLUME
@@ -754,6 +758,16 @@ void LLPanelFace::getState()
754 childSetEnabled("button apply",enabled); 758 childSetEnabled("button apply",enabled);
755 } 759 }
756 } 760 }
761 childSetEnabled("texture_math_constants",true);
762
763 // Set variable values for numeric expressions
764 calcp->setVar(LLCalc::TEX_U_SCALE, childGetValue("TexScaleU").asReal());
765 calcp->setVar(LLCalc::TEX_V_SCALE, childGetValue("TexScaleV").asReal());
766 calcp->setVar(LLCalc::TEX_U_OFFSET, childGetValue("TexOffsetU").asReal());
767 calcp->setVar(LLCalc::TEX_V_OFFSET, childGetValue("TexOffsetV").asReal());
768 calcp->setVar(LLCalc::TEX_ROTATION, childGetValue("TexRot").asReal());
769 calcp->setVar(LLCalc::TEX_TRANSPARENCY, childGetValue("ColorTrans").asReal());
770 calcp->setVar(LLCalc::TEX_GLOW, childGetValue("glow").asReal());
757 } 771 }
758 else 772 else
759 { 773 {
@@ -787,6 +801,17 @@ void LLPanelFace::getState()
787 801
788 childSetEnabled("button align",FALSE); 802 childSetEnabled("button align",FALSE);
789 childSetEnabled("button apply",FALSE); 803 childSetEnabled("button apply",FALSE);
804
805 childSetEnabled("texture_math_constants",false);
806
807 // Set variable values for numeric expressions
808 calcp->clearVar(LLCalc::TEX_U_SCALE);
809 calcp->clearVar(LLCalc::TEX_V_SCALE);
810 calcp->clearVar(LLCalc::TEX_U_OFFSET);
811 calcp->clearVar(LLCalc::TEX_V_OFFSET);
812 calcp->clearVar(LLCalc::TEX_ROTATION);
813 calcp->clearVar(LLCalc::TEX_TRANSPARENCY);
814 calcp->clearVar(LLCalc::TEX_GLOW);
790 } 815 }
791} 816}
792 817
@@ -969,3 +994,9 @@ void LLPanelFace::onClickAutoFix(void* userdata)
969 LLPanelFaceSendFunctor sendfunc; 994 LLPanelFaceSendFunctor sendfunc;
970 LLSelectMgr::getInstance()->getSelection()->applyToObjects(&sendfunc); 995 LLSelectMgr::getInstance()->getSelection()->applyToObjects(&sendfunc);
971} 996}
997
998// static
999void LLPanelFace::onClickTextureConstants(void *)
1000{
1001 gViewerWindow->alertXml("ClickTextureConstants");
1002} \ No newline at end of file
diff --git a/linden/indra/newview/llpanelface.h b/linden/indra/newview/llpanelface.h
index 230772b..b977583 100644
--- a/linden/indra/newview/llpanelface.h
+++ b/linden/indra/newview/llpanelface.h
@@ -88,6 +88,7 @@ protected:
88 88
89 static void onClickApply(void*); 89 static void onClickApply(void*);
90 static void onClickAutoFix(void*); 90 static void onClickAutoFix(void*);
91 static void onClickTextureConstants(void *);
91 static F32 valueGlow(LLViewerObject* object, S32 face); 92 static F32 valueGlow(LLViewerObject* object, S32 face);
92}; 93};
93 94
diff --git a/linden/indra/newview/llpanelgeneral.cpp b/linden/indra/newview/llpanelgeneral.cpp
index 256f02a..47bc60e 100644
--- a/linden/indra/newview/llpanelgeneral.cpp
+++ b/linden/indra/newview/llpanelgeneral.cpp
@@ -199,6 +199,7 @@ void LLPanelGeneral::refresh()
199 mChatOnlineNotification = gSavedSettings.getBOOL("ChatOnlineNotification"); 199 mChatOnlineNotification = gSavedSettings.getBOOL("ChatOnlineNotification");
200 mAFKTimeout = gSavedSettings.getF32("AFKTimeout"); 200 mAFKTimeout = gSavedSettings.getF32("AFKTimeout");
201 mMiniMapRotate = gSavedSettings.getBOOL("MiniMapRotate"); 201 mMiniMapRotate = gSavedSettings.getBOOL("MiniMapRotate");
202 mMiniMapTeleport = gSavedSettings.getBOOL("MiniMapTeleport");
202 mNotifyMoney = gSavedSettings.getBOOL("NotifyMoneyChange"); 203 mNotifyMoney = gSavedSettings.getBOOL("NotifyMoneyChange");
203 mUseDefaultColor = gSavedSettings.getBOOL("UseDefaultColorPicker"); 204 mUseDefaultColor = gSavedSettings.getBOOL("UseDefaultColorPicker");
204 mEffectColor = gSavedSettings.getColor4("EffectColor"); 205 mEffectColor = gSavedSettings.getColor4("EffectColor");
@@ -223,6 +224,7 @@ void LLPanelGeneral::cancel()
223 gSavedSettings.setBOOL("ChatOnlineNotification", mChatOnlineNotification ); 224 gSavedSettings.setBOOL("ChatOnlineNotification", mChatOnlineNotification );
224 gSavedSettings.setF32("AFKTimeout", mAFKTimeout ); 225 gSavedSettings.setF32("AFKTimeout", mAFKTimeout );
225 gSavedSettings.setBOOL("MiniMapRotate", mMiniMapRotate ); 226 gSavedSettings.setBOOL("MiniMapRotate", mMiniMapRotate );
227 gSavedSettings.setBOOL("MiniMapTeleport", mMiniMapTeleport);
226 gSavedSettings.setBOOL("NotifyMoneyChange", mNotifyMoney ); 228 gSavedSettings.setBOOL("NotifyMoneyChange", mNotifyMoney );
227 gSavedSettings.setBOOL("UseDefaultColorPicker", mUseDefaultColor ); 229 gSavedSettings.setBOOL("UseDefaultColorPicker", mUseDefaultColor );
228 gSavedSettings.setBOOL("ShowSearchBar", mShowSearch); 230 gSavedSettings.setBOOL("ShowSearchBar", mShowSearch);
diff --git a/linden/indra/newview/llpanelgeneral.h b/linden/indra/newview/llpanelgeneral.h
index a7b526d..95a95f8 100644
--- a/linden/indra/newview/llpanelgeneral.h
+++ b/linden/indra/newview/llpanelgeneral.h
@@ -71,6 +71,7 @@ protected:
71 F32 mUIScaleFactor; 71 F32 mUIScaleFactor;
72 BOOL mUIAutoScale; 72 BOOL mUIAutoScale;
73 BOOL mMiniMapRotate; 73 BOOL mMiniMapRotate;
74 BOOL mMiniMapTeleport;
74 S32 mOldCrashBehavior; 75 S32 mOldCrashBehavior;
75 std::string mLoginLocation; 76 std::string mLoginLocation;
76 std::string mLanguage; 77 std::string mLanguage;
diff --git a/linden/indra/newview/llpanelobject.cpp b/linden/indra/newview/llpanelobject.cpp
index cc9d969..5cd8690 100644
--- a/linden/indra/newview/llpanelobject.cpp
+++ b/linden/indra/newview/llpanelobject.cpp
@@ -46,6 +46,7 @@
46// project includes 46// project includes
47#include "llagent.h" 47#include "llagent.h"
48#include "llbutton.h" 48#include "llbutton.h"
49#include "llcalc.h"
49#include "llcheckboxctrl.h" 50#include "llcheckboxctrl.h"
50#include "llcolorswatch.h" 51#include "llcolorswatch.h"
51#include "llcombobox.h" 52#include "llcombobox.h"
@@ -109,6 +110,9 @@ BOOL LLPanelObject::postBuild()
109 // Top 110 // Top
110 //-------------------------------------------------------- 111 //--------------------------------------------------------
111 112
113 // Build constant tipsheet
114 childSetAction("build_math_constants",onClickBuildConstants,this);
115
112 // Lock checkbox 116 // Lock checkbox
113 mCheckLock = getChild<LLCheckBoxCtrl>("checkbox locked"); 117 mCheckLock = getChild<LLCheckBoxCtrl>("checkbox locked");
114 childSetCommitCallback("checkbox locked",onCommitLock,this); 118 childSetCommitCallback("checkbox locked",onCommitLock,this);
@@ -341,6 +345,8 @@ void LLPanelObject::getState( )
341 } 345 }
342 } 346 }
343 347
348 LLCalc* calcp = LLCalc::getInstance();
349
344 LLVOVolume *volobjp = NULL; 350 LLVOVolume *volobjp = NULL;
345 if ( objectp && (objectp->getPCode() == LL_PCODE_VOLUME)) 351 if ( objectp && (objectp->getPCode() == LL_PCODE_VOLUME))
346 { 352 {
@@ -357,6 +363,7 @@ void LLPanelObject::getState( )
357 363
358 // Disable all text input fields 364 // Disable all text input fields
359 clearCtrls(); 365 clearCtrls();
366 calcp->clearAllVariables();
360 return; 367 return;
361 } 368 }
362 369
@@ -365,6 +372,7 @@ void LLPanelObject::getState( )
365 BOOL enable_scale = objectp->permMove() && objectp->permModify(); 372 BOOL enable_scale = objectp->permMove() && objectp->permModify();
366 BOOL enable_rotate = objectp->permMove() && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts")); 373 BOOL enable_rotate = objectp->permMove() && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts"));
367 374
375 childSetEnabled("build_math_constants",true);
368 LLVector3 vec; 376 LLVector3 vec;
369 if (enable_move) 377 if (enable_move)
370 { 378 {
@@ -372,12 +380,18 @@ void LLPanelObject::getState( )
372 mCtrlPosX->set( vec.mV[VX] ); 380 mCtrlPosX->set( vec.mV[VX] );
373 mCtrlPosY->set( vec.mV[VY] ); 381 mCtrlPosY->set( vec.mV[VY] );
374 mCtrlPosZ->set( vec.mV[VZ] ); 382 mCtrlPosZ->set( vec.mV[VZ] );
383 calcp->setVar(LLCalc::X_POS, vec.mV[VX]);
384 calcp->setVar(LLCalc::Y_POS, vec.mV[VY]);
385 calcp->setVar(LLCalc::Z_POS, vec.mV[VZ]);
375 } 386 }
376 else 387 else
377 { 388 {
378 mCtrlPosX->clear(); 389 mCtrlPosX->clear();
379 mCtrlPosY->clear(); 390 mCtrlPosY->clear();
380 mCtrlPosZ->clear(); 391 mCtrlPosZ->clear();
392 calcp->clearVar(LLCalc::X_POS);
393 calcp->clearVar(LLCalc::Y_POS);
394 calcp->clearVar(LLCalc::Z_POS);
381 } 395 }
382 396
383 397
@@ -392,12 +406,18 @@ void LLPanelObject::getState( )
392 mCtrlScaleX->set( vec.mV[VX] ); 406 mCtrlScaleX->set( vec.mV[VX] );
393 mCtrlScaleY->set( vec.mV[VY] ); 407 mCtrlScaleY->set( vec.mV[VY] );
394 mCtrlScaleZ->set( vec.mV[VZ] ); 408 mCtrlScaleZ->set( vec.mV[VZ] );
409 calcp->setVar(LLCalc::X_SCALE, vec.mV[VX]);
410 calcp->setVar(LLCalc::Y_SCALE, vec.mV[VY]);
411 calcp->setVar(LLCalc::Z_SCALE, vec.mV[VZ]);
395 } 412 }
396 else 413 else
397 { 414 {
398 mCtrlScaleX->clear(); 415 mCtrlScaleX->clear();
399 mCtrlScaleY->clear(); 416 mCtrlScaleY->clear();
400 mCtrlScaleZ->clear(); 417 mCtrlScaleZ->clear();
418 calcp->setVar(LLCalc::X_SCALE, 0.f);
419 calcp->setVar(LLCalc::Y_SCALE, 0.f);
420 calcp->setVar(LLCalc::Z_SCALE, 0.f);
401 } 421 }
402 422
403 mLabelSize->setEnabled( enable_scale ); 423 mLabelSize->setEnabled( enable_scale );
@@ -417,12 +437,18 @@ void LLPanelObject::getState( )
417 mCtrlRotX->set( mCurEulerDegrees.mV[VX] ); 437 mCtrlRotX->set( mCurEulerDegrees.mV[VX] );
418 mCtrlRotY->set( mCurEulerDegrees.mV[VY] ); 438 mCtrlRotY->set( mCurEulerDegrees.mV[VY] );
419 mCtrlRotZ->set( mCurEulerDegrees.mV[VZ] ); 439 mCtrlRotZ->set( mCurEulerDegrees.mV[VZ] );
440 calcp->setVar(LLCalc::X_ROT, mCurEulerDegrees.mV[VX]);
441 calcp->setVar(LLCalc::Y_ROT, mCurEulerDegrees.mV[VY]);
442 calcp->setVar(LLCalc::Z_ROT, mCurEulerDegrees.mV[VZ]);
420 } 443 }
421 else 444 else
422 { 445 {
423 mCtrlRotX->clear(); 446 mCtrlRotX->clear();
424 mCtrlRotY->clear(); 447 mCtrlRotY->clear();
425 mCtrlRotZ->clear(); 448 mCtrlRotZ->clear();
449 calcp->clearVar(LLCalc::X_ROT);
450 calcp->clearVar(LLCalc::Y_ROT);
451 calcp->clearVar(LLCalc::Z_ROT);
426 } 452 }
427 453
428 mLabelRotation->setEnabled( enable_rotate ); 454 mLabelRotation->setEnabled( enable_rotate );
@@ -678,8 +704,9 @@ void LLPanelObject::getState( )
678 F32 end_t = volume_params.getEndT(); 704 F32 end_t = volume_params.getEndT();
679 705
680 // Hollowness 706 // Hollowness
681 F32 hollow = volume_params.getHollow(); 707 F32 hollow = 100.f * volume_params.getHollow();
682 mSpinHollow->set( 100.f * hollow ); 708 mSpinHollow->set( hollow );
709 calcp->setVar(LLCalc::HOLLOW, hollow);
683 710
684 // All hollow objects allow a shape to be selected. 711 // All hollow objects allow a shape to be selected.
685 if (hollow > 0.f) 712 if (hollow > 0.f)
@@ -732,6 +759,10 @@ void LLPanelObject::getState( )
732 mSpinCutEnd ->set( cut_end ); 759 mSpinCutEnd ->set( cut_end );
733 mCtrlPathBegin ->set( adv_cut_begin ); 760 mCtrlPathBegin ->set( adv_cut_begin );
734 mCtrlPathEnd ->set( adv_cut_end ); 761 mCtrlPathEnd ->set( adv_cut_end );
762 calcp->setVar(LLCalc::CUT_BEGIN, cut_begin);
763 calcp->setVar(LLCalc::CUT_END, cut_end);
764 calcp->setVar(LLCalc::PATH_BEGIN, adv_cut_begin);
765 calcp->setVar(LLCalc::PATH_END, adv_cut_end);
735 766
736 // Twist 767 // Twist
737 F32 twist = volume_params.getTwist(); 768 F32 twist = volume_params.getTwist();
@@ -750,18 +781,24 @@ void LLPanelObject::getState( )
750 781
751 mSpinTwist ->set( twist ); 782 mSpinTwist ->set( twist );
752 mSpinTwistBegin ->set( twist_begin ); 783 mSpinTwistBegin ->set( twist_begin );
784 calcp->setVar(LLCalc::TWIST_END, twist);
785 calcp->setVar(LLCalc::TWIST_BEGIN, twist_begin);
753 786
754 // Shear 787 // Shear
755 F32 shear_x = volume_params.getShearX(); 788 F32 shear_x = volume_params.getShearX();
756 F32 shear_y = volume_params.getShearY(); 789 F32 shear_y = volume_params.getShearY();
757 mSpinShearX->set( shear_x ); 790 mSpinShearX->set( shear_x );
758 mSpinShearY->set( shear_y ); 791 mSpinShearY->set( shear_y );
792 calcp->setVar(LLCalc::X_SHEAR, shear_x);
793 calcp->setVar(LLCalc::Y_SHEAR, shear_y);
759 794
760 // Taper 795 // Taper
761 F32 taper_x = volume_params.getTaperX(); 796 F32 taper_x = volume_params.getTaperX();
762 F32 taper_y = volume_params.getTaperY(); 797 F32 taper_y = volume_params.getTaperY();
763 mSpinTaperX->set( taper_x ); 798 mSpinTaperX->set( taper_x );
764 mSpinTaperY->set( taper_y ); 799 mSpinTaperY->set( taper_y );
800 calcp->setVar(LLCalc::X_TAPER, taper_x);
801 calcp->setVar(LLCalc::Y_TAPER, taper_y);
765 802
766 // Radius offset. 803 // Radius offset.
767 F32 radius_offset = volume_params.getRadiusOffset(); 804 F32 radius_offset = volume_params.getRadiusOffset();
@@ -791,10 +828,12 @@ void LLPanelObject::getState( )
791 } 828 }
792 } 829 }
793 mSpinRadiusOffset->set( radius_offset); 830 mSpinRadiusOffset->set( radius_offset);
831 calcp->setVar(LLCalc::RADIUS_OFFSET, radius_offset);
794 832
795 // Revolutions 833 // Revolutions
796 F32 revolutions = volume_params.getRevolutions(); 834 F32 revolutions = volume_params.getRevolutions();
797 mSpinRevolutions->set( revolutions ); 835 mSpinRevolutions->set( revolutions );
836 calcp->setVar(LLCalc::REVOLUTIONS, revolutions);
798 837
799 // Skew 838 // Skew
800 F32 skew = volume_params.getSkew(); 839 F32 skew = volume_params.getSkew();
@@ -819,6 +858,7 @@ void LLPanelObject::getState( )
819 } 858 }
820 } 859 }
821 mSpinSkew->set( skew ); 860 mSpinSkew->set( skew );
861 calcp->setVar(LLCalc::SKEW, skew);
822 } 862 }
823 863
824 // Compute control visibility, label names, and twist range. 864 // Compute control visibility, label names, and twist range.
@@ -924,6 +964,8 @@ void LLPanelObject::getState( )
924 case MI_RING: 964 case MI_RING:
925 mSpinScaleX->set( scale_x ); 965 mSpinScaleX->set( scale_x );
926 mSpinScaleY->set( scale_y ); 966 mSpinScaleY->set( scale_y );
967 calcp->setVar(LLCalc::X_HOLE, scale_x);
968 calcp->setVar(LLCalc::Y_HOLE, scale_y);
927 mSpinScaleX->setMinValue(OBJECT_MIN_HOLE_SIZE); 969 mSpinScaleX->setMinValue(OBJECT_MIN_HOLE_SIZE);
928 mSpinScaleX->setMaxValue(OBJECT_MAX_HOLE_SIZE_X); 970 mSpinScaleX->setMaxValue(OBJECT_MAX_HOLE_SIZE_X);
929 mSpinScaleY->setMinValue(OBJECT_MIN_HOLE_SIZE); 971 mSpinScaleY->setMinValue(OBJECT_MIN_HOLE_SIZE);
@@ -934,6 +976,8 @@ void LLPanelObject::getState( )
934 { 976 {
935 mSpinScaleX->set( 1.f - scale_x ); 977 mSpinScaleX->set( 1.f - scale_x );
936 mSpinScaleY->set( 1.f - scale_y ); 978 mSpinScaleY->set( 1.f - scale_y );
979 calcp->setVar(LLCalc::X_HOLE, 1.f - scale_x);
980 calcp->setVar(LLCalc::Y_HOLE, 1.f - scale_y);
937 mSpinScaleX->setMinValue(-1.f); 981 mSpinScaleX->setMinValue(-1.f);
938 mSpinScaleX->setMaxValue(1.f); 982 mSpinScaleX->setMaxValue(1.f);
939 mSpinScaleY->setMinValue(-1.f); 983 mSpinScaleY->setMinValue(-1.f);
@@ -1148,7 +1192,7 @@ void LLPanelObject::getState( )
1148 mSculptTextureRevert = LLUUID::null; 1192 mSculptTextureRevert = LLUUID::null;
1149 } 1193 }
1150 1194
1151 1195
1152 //---------------------------------------------------------------------------- 1196 //----------------------------------------------------------------------------
1153 1197
1154 mObject = objectp; 1198 mObject = objectp;
@@ -1913,6 +1957,8 @@ void LLPanelObject::clearCtrls()
1913 childSetEnabled( "advanced_cut", FALSE ); 1957 childSetEnabled( "advanced_cut", FALSE );
1914 childSetEnabled( "advanced_dimple", FALSE ); 1958 childSetEnabled( "advanced_dimple", FALSE );
1915 childSetVisible("advanced_slice", FALSE); 1959 childSetVisible("advanced_slice", FALSE);
1960
1961 childSetEnabled("build_math_constants",false);
1916} 1962}
1917 1963
1918// 1964//
@@ -1954,6 +2000,9 @@ void LLPanelObject::onCommitRotation( LLUICtrl* ctrl, void* userdata )
1954 LLPanelObject* self = (LLPanelObject*) userdata; 2000 LLPanelObject* self = (LLPanelObject*) userdata;
1955 BOOL btn_down = ((LLSpinCtrl*)ctrl)->isMouseHeldDown() ; 2001 BOOL btn_down = ((LLSpinCtrl*)ctrl)->isMouseHeldDown() ;
1956 self->sendRotation(btn_down); 2002 self->sendRotation(btn_down);
2003
2004 // Needed to ensure all rotations are shown consistently in range
2005 self->refresh();
1957} 2006}
1958 2007
1959// static 2008// static
@@ -2048,3 +2097,9 @@ void LLPanelObject::onCommitSculptType(LLUICtrl *ctrl, void* userdata)
2048 2097
2049 self->sendSculpt(); 2098 self->sendSculpt();
2050} 2099}
2100
2101// static
2102void LLPanelObject::onClickBuildConstants(void *)
2103{
2104 gViewerWindow->alertXml("ClickBuildConstants");
2105}
diff --git a/linden/indra/newview/llpanelobject.h b/linden/indra/newview/llpanelobject.h
index afdfd30..b72289c 100644
--- a/linden/indra/newview/llpanelobject.h
+++ b/linden/indra/newview/llpanelobject.h
@@ -83,6 +83,7 @@ public:
83 static BOOL onDropSculpt( LLUICtrl* ctrl, LLInventoryItem* item, void* ud); 83 static BOOL onDropSculpt( LLUICtrl* ctrl, LLInventoryItem* item, void* ud);
84 static void onCommitSculptType( LLUICtrl *ctrl, void* userdata); 84 static void onCommitSculptType( LLUICtrl *ctrl, void* userdata);
85 85
86 static void onClickBuildConstants(void *);
86 87
87protected: 88protected:
88 void getState(); 89 void getState();
diff --git a/linden/indra/newview/llpreviewlandmark.cpp b/linden/indra/newview/llpreviewlandmark.cpp
index 01d77f6..dba603b 100644
--- a/linden/indra/newview/llpreviewlandmark.cpp
+++ b/linden/indra/newview/llpreviewlandmark.cpp
@@ -90,7 +90,15 @@ LLPreviewLandmark::LLPreviewLandmark(const std::string& name,
90{ 90{
91 91
92 mFactoryMap["place_details_panel"] = LLCallbackMap(LLPreviewLandmark::createPlaceDetail, this); 92 mFactoryMap["place_details_panel"] = LLCallbackMap(LLPreviewLandmark::createPlaceDetail, this);
93 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_existing_landmark.xml", &getFactoryMap()); 93 if (show_keep_discard)
94 {
95 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_new_landmark.xml", &getFactoryMap());
96 childSetAction("Discard btn",onDiscardBtn,this);
97 }
98 else
99 {
100 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_existing_landmark.xml", &getFactoryMap());
101 }
94 102
95 /* 103 /*
96 childSetCommitCallback("desc_editor", LLPreview::onText, this); 104 childSetCommitCallback("desc_editor", LLPreview::onText, this);
diff --git a/linden/indra/newview/llpreviewsound.cpp b/linden/indra/newview/llpreviewsound.cpp
index 9ba6fd5..6b79bfb 100644
--- a/linden/indra/newview/llpreviewsound.cpp
+++ b/linden/indra/newview/llpreviewsound.cpp
@@ -106,7 +106,6 @@ void LLPreviewSound::auditionSound( void *userdata )
106 if(item && gAudiop) 106 if(item && gAudiop)
107 { 107 {
108 LLVector3d lpos_global = gAgent.getPositionGlobal(); 108 LLVector3d lpos_global = gAgent.getPositionGlobal();
109 F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : SOUND_GAIN * gSavedSettings.getF32("AudioLevelSFX"); 109 gAudiop->triggerSound(item->getAssetUUID(), gAgent.getID(), SOUND_GAIN, LLAudioEngine::AUDIO_TYPE_UI, lpos_global);
110 gAudiop->triggerSound(item->getAssetUUID(), gAgent.getID(), volume, lpos_global);
111 } 110 }
112} 111}
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index 6371f2b..c863d19 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -45,6 +45,10 @@
45# include "audioengine_fmod.h" 45# include "audioengine_fmod.h"
46#endif 46#endif
47 47
48#ifdef LL_OPENAL
49#include "audioengine_openal.h"
50#endif
51
48#include "llares.h" 52#include "llares.h"
49#include "llcachename.h" 53#include "llcachename.h"
50#include "llviewercontrol.h" 54#include "llviewercontrol.h"
@@ -579,10 +583,28 @@ bool idle_startup()
579 583
580 if (FALSE == gSavedSettings.getBOOL("NoAudio")) 584 if (FALSE == gSavedSettings.getBOOL("NoAudio"))
581 { 585 {
582#ifdef LL_FMOD
583 gAudiop = (LLAudioEngine *) new LLAudioEngine_FMOD();
584#else
585 gAudiop = NULL; 586 gAudiop = NULL;
587
588#ifdef LL_OPENAL
589 if (!gAudiop
590#if !LL_WINDOWS
591 && NULL == getenv("LL_BAD_OPENAL_DRIVER")
592#endif // !LL_WINDOWS
593 )
594 {
595 gAudiop = (LLAudioEngine *) new LLAudioEngine_OpenAL();
596 }
597#endif
598
599#ifdef LL_FMOD
600 if (!gAudiop
601#if !LL_WINDOWS
602 && NULL == getenv("LL_BAD_FMOD_DRIVER")
603#endif // !LL_WINDOWS
604 )
605 {
606 gAudiop = (LLAudioEngine *) new LLAudioEngine_FMOD();
607 }
586#endif 608#endif
587 609
588 if (gAudiop) 610 if (gAudiop)
@@ -595,15 +617,21 @@ bool idle_startup()
595 void* window_handle = NULL; 617 void* window_handle = NULL;
596#endif 618#endif
597 bool init = gAudiop->init(kAUDIO_NUM_SOURCES, window_handle); 619 bool init = gAudiop->init(kAUDIO_NUM_SOURCES, window_handle);
598 if(!init) 620 if(init)
621 {
622 gAudiop->setMuted(TRUE);
623 }
624 else
599 { 625 {
600 LL_WARNS("AppInit") << "Unable to initialize audio engine" << LL_ENDL; 626 LL_WARNS("AppInit") << "Unable to initialize audio engine" << LL_ENDL;
627 delete gAudiop;
628 gAudiop = NULL;
601 } 629 }
602 gAudiop->setMuted(TRUE);
603 } 630 }
604 } 631 }
605 632
606 LL_INFOS("AppInit") << "Audio Engine Initialized." << LL_ENDL; 633 LL_INFOS("AppInit") << "Audio Engine Initialized." << LL_ENDL;
634
607 635
608 if (LLTimer::knownBadTimer()) 636 if (LLTimer::knownBadTimer())
609 { 637 {
@@ -750,6 +778,12 @@ bool idle_startup()
750 gLoginMenuBarView->setVisible( TRUE ); 778 gLoginMenuBarView->setVisible( TRUE );
751 gLoginMenuBarView->setEnabled( TRUE ); 779 gLoginMenuBarView->setEnabled( TRUE );
752 780
781 // DEV-16927. The following code removes errant keystrokes that happen while the window is being
782 // first made visible.
783#ifdef _WIN32
784 MSG msg;
785 while( PeekMessage( &msg, /*All hWnds owned by this thread */ NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE ) );
786#endif
753 timeout.reset(); 787 timeout.reset();
754 return FALSE; 788 return FALSE;
755 } 789 }
diff --git a/linden/indra/newview/llvieweraudio.cpp b/linden/indra/newview/llvieweraudio.cpp
index 122a0bc..bc25649 100644
--- a/linden/indra/newview/llvieweraudio.cpp
+++ b/linden/indra/newview/llvieweraudio.cpp
@@ -62,7 +62,7 @@ void init_audio()
62 62
63// load up our initial set of sounds we'll want so they're in memory and ready to be played 63// load up our initial set of sounds we'll want so they're in memory and ready to be played
64 64
65 BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); 65 bool mute_audio = gSavedSettings.getBOOL("MuteAudio");
66 66
67 if (!mute_audio && FALSE == gSavedSettings.getBOOL("NoPreload")) 67 if (!mute_audio && FALSE == gSavedSettings.getBOOL("NoPreload"))
68 { 68 {
@@ -114,7 +114,9 @@ void init_audio()
114void audio_update_volume(bool force_update) 114void audio_update_volume(bool force_update)
115{ 115{
116 F32 master_volume = gSavedSettings.getF32("AudioLevelMaster"); 116 F32 master_volume = gSavedSettings.getF32("AudioLevelMaster");
117 BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); 117 bool wind_muted = gSavedSettings.getBOOL("MuteWind");
118 bool mute_audio = gSavedSettings.getBOOL("MuteAudio");
119
118 if (!gViewerWindow->getActive() && (gSavedSettings.getBOOL("MuteWhenMinimized"))) 120 if (!gViewerWindow->getActive() && (gSavedSettings.getBOOL("MuteWhenMinimized")))
119 { 121 {
120 mute_audio = TRUE; 122 mute_audio = TRUE;
@@ -129,9 +131,9 @@ void audio_update_volume(bool force_update)
129 gAudiop->setDopplerFactor(gSavedSettings.getF32("AudioLevelDoppler")); 131 gAudiop->setDopplerFactor(gSavedSettings.getF32("AudioLevelDoppler"));
130 gAudiop->setDistanceFactor(gSavedSettings.getF32("AudioLevelDistance")); 132 gAudiop->setDistanceFactor(gSavedSettings.getF32("AudioLevelDistance"));
131 gAudiop->setRolloffFactor(gSavedSettings.getF32("AudioLevelRolloff")); 133 gAudiop->setRolloffFactor(gSavedSettings.getF32("AudioLevelRolloff"));
132#ifdef kAUDIO_ENABLE_WIND 134
135 if(wind_muted == false)
133 gAudiop->enableWind(!mute_audio); 136 gAudiop->enableWind(!mute_audio);
134#endif
135 137
136 gAudiop->setMuted(mute_audio); 138 gAudiop->setMuted(mute_audio);
137 139
@@ -197,46 +199,50 @@ void audio_update_listener()
197 199
198void audio_update_wind(bool force_update) 200void audio_update_wind(bool force_update)
199{ 201{
200#ifdef kAUDIO_ENABLE_WIND 202 bool wind_muted = gSavedSettings.getBOOL("MuteWind");
201 // 203 bool mute_audio = gSavedSettings.getBOOL("MuteAudio");
202 // Extract height above water to modulate filter by whether above/below water 204
203 // 205 if(!mute_audio && !wind_muted)
204 LLViewerRegion* region = gAgent.getRegion();
205 if (region)
206 { 206 {
207 static F32 last_camera_water_height = -1000.f;
208 LLVector3 camera_pos = gAgent.getCameraPositionAgent();
209 F32 camera_water_height = camera_pos.mV[VZ] - region->getWaterHeight();
210
211 // 207 //
212 // Don't update rolloff factor unless water surface has been crossed 208 // Extract height above water to modulate filter by whether above/below water
213 // 209 //
214 if (force_update || (last_camera_water_height * camera_water_height) < 0.f) 210 LLViewerRegion* region = gAgent.getRegion();
211 if (region)
215 { 212 {
216 if (camera_water_height < 0.f) 213 static F32 last_camera_water_height = -1000.f;
217 { 214 LLVector3 camera_pos = gAgent.getCameraPositionAgent();
218 gAudiop->setRolloffFactor(gSavedSettings.getF32("AudioLevelRolloff") * LL_ROLLOFF_MULTIPLIER_UNDER_WATER); 215 F32 camera_water_height = camera_pos.mV[VZ] - region->getWaterHeight();
219 } 216
220 else 217 //
218 // Don't update rolloff factor unless water surface has been crossed
219 //
220 if (force_update || (last_camera_water_height * camera_water_height) < 0.f)
221 { 221 {
222 gAudiop->setRolloffFactor(gSavedSettings.getF32("AudioLevelRolloff")); 222 if (camera_water_height < 0.f)
223 {
224 gAudiop->setRolloffFactor(gSavedSettings.getF32("AudioLevelRolloff") * LL_ROLLOFF_MULTIPLIER_UNDER_WATER);
225 }
226 else
227 {
228 gAudiop->setRolloffFactor(gSavedSettings.getF32("AudioLevelRolloff"));
229 }
223 } 230 }
231 // this line rotates the wind vector to be listener (agent) relative
232 // unfortunately we have to pre-translate to undo the translation that
233 // occurs in the transform call
234 gRelativeWindVec = gAgent.getFrameAgent().rotateToLocal(gWindVec - gAgent.getVelocity());
235
236 // don't use the setter setMaxWindGain() because we don't
237 // want to screw up the fade-in on startup by setting actual source gain
238 // outside the fade-in.
239 F32 ambient_volume = gSavedSettings.getF32("AudioLevelAmbient");
240 gAudiop->mMaxWindGain = gSavedSettings.getBOOL("MuteAmbient")
241 ? 0.f
242 : ambient_volume * ambient_volume;
243
244 last_camera_water_height = camera_water_height;
245 gAudiop->updateWind(gRelativeWindVec, camera_water_height);
224 } 246 }
225 // this line rotates the wind vector to be listener (agent) relative
226 // unfortunately we have to pre-translate to undo the translation that
227 // occurs in the transform call
228 gRelativeWindVec = gAgent.getFrameAgent().rotateToLocal(gWindVec - gAgent.getVelocity());
229
230 // don't use the setter setMaxWindGain() because we don't
231 // want to screw up the fade-in on startup by setting actual source gain
232 // outside the fade-in.
233 F32 ambient_volume = gSavedSettings.getF32("AudioLevelAmbient");
234 gAudiop->mMaxWindGain = gSavedSettings.getBOOL("MuteAmbient")
235 ? 0.f
236 : ambient_volume * ambient_volume;
237
238 last_camera_water_height = camera_water_height;
239 gAudiop->updateWind(gRelativeWindVec, camera_water_height);
240 } 247 }
241#endif
242} 248}
diff --git a/linden/indra/newview/llvieweraudio.h b/linden/indra/newview/llvieweraudio.h
index 6ab7c7f..b4a299c 100644
--- a/linden/indra/newview/llvieweraudio.h
+++ b/linden/indra/newview/llvieweraudio.h
@@ -32,8 +32,6 @@
32#ifndef LL_VIEWERAUDIO_H 32#ifndef LL_VIEWERAUDIO_H
33#define LL_VIEWERAUDIO_H 33#define LL_VIEWERAUDIO_H
34 34
35// comment out to turn off wind
36#define kAUDIO_ENABLE_WIND
37//#define kAUDIO_ENABLE_WATER 1 // comment out to turn off water 35//#define kAUDIO_ENABLE_WATER 1 // comment out to turn off water
38#define kAUDIO_NUM_BUFFERS 30 36#define kAUDIO_NUM_BUFFERS 30
39#define kAUDIO_NUM_SOURCES 30 37#define kAUDIO_NUM_SOURCES 30
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index 97f3761..f99a324 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -146,13 +146,14 @@
146#include "llinventorymodel.h" 146#include "llinventorymodel.h"
147#include "llinventoryview.h" 147#include "llinventoryview.h"
148#include "llkeyboard.h" 148#include "llkeyboard.h"
149#include "llpanellogin.h" 149#include "lllineeditor.h"
150#include "llmenucommands.h" 150#include "llmenucommands.h"
151#include "llmenugl.h" 151#include "llmenugl.h"
152#include "llmorphview.h" 152#include "llmorphview.h"
153#include "llmoveview.h" 153#include "llmoveview.h"
154#include "llmutelist.h" 154#include "llmutelist.h"
155#include "llnotify.h" 155#include "llnotify.h"
156#include "llpanellogin.h"
156#include "llpanelobject.h" 157#include "llpanelobject.h"
157#include "llparcel.h" 158#include "llparcel.h"
158#include "llprimitive.h" 159#include "llprimitive.h"
@@ -174,6 +175,7 @@
174#include "lltoolpie.h" 175#include "lltoolpie.h"
175#include "lltoolplacer.h" 176#include "lltoolplacer.h"
176#include "lltoolselectland.h" 177#include "lltoolselectland.h"
178#include "lltrans.h"
177#include "lluictrlfactory.h" 179#include "lluictrlfactory.h"
178#include "lluploaddialog.h" 180#include "lluploaddialog.h"
179#include "lluserauth.h" 181#include "lluserauth.h"
@@ -784,12 +786,6 @@ void init_client_menu(LLMenuGL* menu)
784 menu->appendMenu(sub_menu); 786 menu->appendMenu(sub_menu);
785 787
786 menu->appendSeparator(); 788 menu->appendSeparator();
787
788 menu->append(new LLMenuItemCheckGL( "High-res Snapshot",
789 &menu_toggle_control,
790 NULL,
791 &menu_check_control,
792 (void*)"HighResSnapshot"));
793 789
794 menu->append(new LLMenuItemCheckGL( "Quiet Snapshots to Disk", 790 menu->append(new LLMenuItemCheckGL( "Quiet Snapshots to Disk",
795 &menu_toggle_control, 791 &menu_toggle_control,
@@ -797,12 +793,6 @@ void init_client_menu(LLMenuGL* menu)
797 &menu_check_control, 793 &menu_check_control,
798 (void*)"QuietSnapshotsToDisk")); 794 (void*)"QuietSnapshotsToDisk"));
799 795
800 menu->append(new LLMenuItemCheckGL( "Compress Snapshots to Disk",
801 &menu_toggle_control,
802 NULL,
803 &menu_check_control,
804 (void*)"CompressSnapshotsToDisk"));
805
806 menu->append(new LLMenuItemCheckGL("Show Mouselook Crosshairs", 796 menu->append(new LLMenuItemCheckGL("Show Mouselook Crosshairs",
807 &menu_toggle_control, 797 &menu_toggle_control,
808 NULL, 798 NULL,
@@ -921,12 +911,6 @@ void init_client_menu(LLMenuGL* menu)
921 &menu_check_control, 911 &menu_check_control,
922 (void*)"LimitSelectDistance")); 912 (void*)"LimitSelectDistance"));
923 913
924 menu->append(new LLMenuItemCheckGL("Disable Camera Constraints",
925 &menu_toggle_control,
926 NULL,
927 &menu_check_control,
928 (void*)"DisableCameraConstraints"));
929
930 menu->append(new LLMenuItemCheckGL("Mouse Smoothing", 914 menu->append(new LLMenuItemCheckGL("Mouse Smoothing",
931 &menu_toggle_control, 915 &menu_toggle_control,
932 NULL, 916 NULL,
@@ -1377,7 +1361,7 @@ void init_debug_avatar_menu(LLMenuGL* menu)
1377 menu->append(new LLMenuItemToggleGL( "Display Agent Target", &LLAgent::sDebugDisplayTarget)); 1361 menu->append(new LLMenuItemToggleGL( "Display Agent Target", &LLAgent::sDebugDisplayTarget));
1378 menu->append(new LLMenuItemToggleGL( "Debug Rotation", &gDebugAvatarRotation)); 1362 menu->append(new LLMenuItemToggleGL( "Debug Rotation", &gDebugAvatarRotation));
1379 menu->append(new LLMenuItemCallGL("Dump Attachments", handle_dump_attachments)); 1363 menu->append(new LLMenuItemCallGL("Dump Attachments", handle_dump_attachments));
1380 menu->append(new LLMenuItemCallGL("Rebake Textures", handle_rebake_textures, NULL, NULL, 'R', MASK_ALT | MASK_CONTROL )); 1364 menu->append(new LLMenuItemCallGL("Refresh Appearance", handle_rebake_textures, NULL, NULL, 'R', MASK_ALT | MASK_CONTROL ));
1381#ifndef LL_RELEASE_FOR_DOWNLOAD 1365#ifndef LL_RELEASE_FOR_DOWNLOAD
1382 menu->append(new LLMenuItemCallGL("Debug Avatar Textures", handle_debug_avatar_textures, NULL, NULL, 'A', MASK_SHIFT|MASK_CONTROL|MASK_ALT)); 1366 menu->append(new LLMenuItemCallGL("Debug Avatar Textures", handle_debug_avatar_textures, NULL, NULL, 'A', MASK_SHIFT|MASK_CONTROL|MASK_ALT));
1383 menu->append(new LLMenuItemCallGL("Dump Local Textures", handle_dump_avatar_local_textures, NULL, NULL, 'M', MASK_SHIFT|MASK_ALT )); 1367 menu->append(new LLMenuItemCallGL("Dump Local Textures", handle_dump_avatar_local_textures, NULL, NULL, 'M', MASK_SHIFT|MASK_ALT ));
@@ -4781,10 +4765,17 @@ class LLWorldCreateLandmark : public view_listener_t
4781 return true; 4765 return true;
4782 } 4766 }
4783 4767
4768 LLChat chat;
4769
4784 LLUUID folder_id; 4770 LLUUID folder_id;
4785 folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK); 4771 folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
4786 std::string pos_string; 4772 std::string pos_string;
4787 gAgent.buildLocationString(pos_string); 4773 gAgent.buildLocationString(pos_string);
4774
4775 std::string log_message = LLTrans::getString("landmark_created") + " ";
4776 log_message += pos_string;
4777 chat.mText = log_message;
4778 LLFloaterChat::addChat(chat, FALSE, FALSE);
4788 4779
4789 create_inventory_item(gAgent.getID(), gAgent.getSessionID(), 4780 create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
4790 folder_id, LLTransactionID::tnull, 4781 folder_id, LLTransactionID::tnull,
@@ -6166,11 +6157,6 @@ BOOL menu_ui_enabled(void *user_data)
6166void menu_toggle_control( void* user_data ) 6157void menu_toggle_control( void* user_data )
6167{ 6158{
6168 BOOL checked = gSavedSettings.getBOOL( static_cast<char*>(user_data) ); 6159 BOOL checked = gSavedSettings.getBOOL( static_cast<char*>(user_data) );
6169 if (std::string(static_cast<char*>(user_data)) == "HighResSnapshot" && !checked)
6170 {
6171 // High Res Snapshot active, must uncheck RenderUIInSnapshot
6172 gSavedSettings.setBOOL( "RenderUIInSnapshot", FALSE );
6173 }
6174 gSavedSettings.setBOOL( static_cast<char*>(user_data), !checked ); 6160 gSavedSettings.setBOOL( static_cast<char*>(user_data), !checked );
6175} 6161}
6176 6162
@@ -6182,11 +6168,6 @@ class LLToggleControl : public view_listener_t
6182 { 6168 {
6183 std::string control_name = userdata.asString(); 6169 std::string control_name = userdata.asString();
6184 BOOL checked = gSavedSettings.getBOOL( control_name ); 6170 BOOL checked = gSavedSettings.getBOOL( control_name );
6185 if (control_name == "HighResSnapshot" && !checked)
6186 {
6187 // High Res Snapshot active, must uncheck RenderUIInSnapshot
6188 gSavedSettings.setBOOL( "RenderUIInSnapshot", FALSE );
6189 }
6190 gSavedSettings.setBOOL( control_name, !checked ); 6171 gSavedSettings.setBOOL( control_name, !checked );
6191 return true; 6172 return true;
6192 } 6173 }
@@ -9658,6 +9639,19 @@ class LLAdvancedLeaveAdminStatus : public view_listener_t
9658 } 9639 }
9659}; 9640};
9660 9641
9642class LLAvatarReportAbuse : public view_listener_t
9643{
9644 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
9645 {
9646 LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
9647 if(avatar)
9648 {
9649 LLFloaterReporter::showFromObject(avatar->getID());
9650 }
9651 return true;
9652 }
9653};
9654
9661 9655
9662 9656
9663static void addMenu(view_listener_t *menu, const char *name) 9657static void addMenu(view_listener_t *menu, const char *name)
@@ -9695,6 +9689,7 @@ void initialize_menus()
9695 addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate"); 9689 addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate");
9696 addMenu(new LLEditEnableTakeOff(), "Edit.EnableTakeOff"); 9690 addMenu(new LLEditEnableTakeOff(), "Edit.EnableTakeOff");
9697 addMenu(new LLEditEnableCustomizeAvatar(), "Edit.EnableCustomizeAvatar"); 9691 addMenu(new LLEditEnableCustomizeAvatar(), "Edit.EnableCustomizeAvatar");
9692 addMenu(new LLAdvancedRebakeTextures(), "Advanced.RebakeTextures");
9698 9693
9699 // View menu 9694 // View menu
9700 addMenu(new LLViewMouselook(), "View.Mouselook"); 9695 addMenu(new LLViewMouselook(), "View.Mouselook");
@@ -9804,6 +9799,7 @@ void initialize_menus()
9804 addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard"); 9799 addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard");
9805 addMenu(new LLAvatarEject(), "Avatar.Eject"); 9800 addMenu(new LLAvatarEject(), "Avatar.Eject");
9806 addMenu(new LLAvatarSendIM(), "Avatar.SendIM"); 9801 addMenu(new LLAvatarSendIM(), "Avatar.SendIM");
9802 addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse");
9807 9803
9808 addMenu(new LLObjectEnableMute(), "Avatar.EnableMute"); 9804 addMenu(new LLObjectEnableMute(), "Avatar.EnableMute");
9809 addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend"); 9805 addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend");
@@ -9849,6 +9845,7 @@ void initialize_menus()
9849 // Land pie menu 9845 // Land pie menu
9850 addMenu(new LLLandBuild(), "Land.Build"); 9846 addMenu(new LLLandBuild(), "Land.Build");
9851 addMenu(new LLLandSit(), "Land.Sit"); 9847 addMenu(new LLLandSit(), "Land.Sit");
9848 addMenu(new LLWorldCreateLandmark(),"Land.NewLandmark");
9852 addMenu(new LLLandBuyPass(), "Land.BuyPass"); 9849 addMenu(new LLLandBuyPass(), "Land.BuyPass");
9853 addMenu(new LLLandEdit(), "Land.Edit"); 9850 addMenu(new LLLandEdit(), "Land.Edit");
9854 9851
@@ -10003,7 +10000,6 @@ void initialize_menus()
10003 addMenu(new LLAdvancedToggleDebugAvatarRotation(), "Advanced.ToggleDebugAvatarRotation"); 10000 addMenu(new LLAdvancedToggleDebugAvatarRotation(), "Advanced.ToggleDebugAvatarRotation");
10004 addMenu(new LLAdvancedCheckDebugAvatarRotation(), "Advanced.CheckDebugAvatarRotation"); 10001 addMenu(new LLAdvancedCheckDebugAvatarRotation(), "Advanced.CheckDebugAvatarRotation");
10005 addMenu(new LLAdvancedDumpAttachments(), "Advanced.DumpAttachments"); 10002 addMenu(new LLAdvancedDumpAttachments(), "Advanced.DumpAttachments");
10006 addMenu(new LLAdvancedRebakeTextures(), "Advanced.RebakeTextures");
10007 addMenu(new LLAdvancedDebugAvatarTextures(), "Advanced.DebugAvatarTextures"); 10003 addMenu(new LLAdvancedDebugAvatarTextures(), "Advanced.DebugAvatarTextures");
10008 addMenu(new LLAdvancedDumpAvatarLocalTextures(), "Advanced.DumpAvatarLocalTextures"); 10004 addMenu(new LLAdvancedDumpAvatarLocalTextures(), "Advanced.DumpAvatarLocalTextures");
10009 10005
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index 0e39026..28ca198 100644
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -833,9 +833,9 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
833 //if we are throttled, don't display them - Gigs 833 //if we are throttled, don't display them - Gigs
834 if (check_offer_throttle(from_name, false)) 834 if (check_offer_throttle(from_name, false))
835 { 835 {
836 // I'm not sure this is a good idea. JC 836 // I'm not sure this is a good idea. JC - Definitely a bad idea. HB
837 bool show_keep_discard = item->getPermissions().getCreator() != gAgent.getID(); 837 //bool show_keep_discard = item->getPermissions().getCreator() != gAgent.getID();
838 //bool show_keep_discard = true; 838 bool show_keep_discard = true;
839 switch(asset_type) 839 switch(asset_type)
840 { 840 {
841 case LLAssetType::AT_NOTECARD: 841 case LLAssetType::AT_NOTECARD:
@@ -3308,8 +3308,7 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
3308 return; 3308 return;
3309 } 3309 }
3310 3310
3311 F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : (gain * gSavedSettings.getF32("AudioLevelSFX")); 3311 gAudiop->triggerSound(sound_id, owner_id, gain, LLAudioEngine::AUDIO_TYPE_SFX, pos_global);
3312 gAudiop->triggerSound(sound_id, owner_id, volume, pos_global);
3313} 3312}
3314 3313
3315void process_preload_sound(LLMessageSystem *msg, void **user_data) 3314void process_preload_sound(LLMessageSystem *msg, void **user_data)
diff --git a/linden/indra/newview/llviewertexteditor.cpp b/linden/indra/newview/llviewertexteditor.cpp
index 8a55b3f..1dda1ca 100644
--- a/linden/indra/newview/llviewertexteditor.cpp
+++ b/linden/indra/newview/llviewertexteditor.cpp
@@ -1402,8 +1402,7 @@ void LLViewerTextEditor::openEmbeddedSound( LLInventoryItem* item )
1402 const F32 SOUND_GAIN = 1.0f; 1402 const F32 SOUND_GAIN = 1.0f;
1403 if(gAudiop) 1403 if(gAudiop)
1404 { 1404 {
1405 F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : (SOUND_GAIN * gSavedSettings.getF32("AudioLevelSFX")); 1405 gAudiop->triggerSound(item->getAssetUUID(), gAgentID, SOUND_GAIN, LLAudioEngine::AUDIO_TYPE_UI, lpos_global);
1406 gAudiop->triggerSound(item->getAssetUUID(), gAgentID, volume, lpos_global);
1407 } 1406 }
1408 showCopyToInvDialog( item ); 1407 showCopyToInvDialog( item );
1409} 1408}
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp
index 2e77316..854d757 100644
--- a/linden/indra/newview/llviewerwindow.cpp
+++ b/linden/indra/newview/llviewerwindow.cpp
@@ -3812,10 +3812,6 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image)
3812 } 3812 }
3813 3813
3814 std::string extension("." + image->getExtension()); 3814 std::string extension("." + image->getExtension());
3815 if (extension.empty())
3816 {
3817 extension = (gSavedSettings.getBOOL("CompressSnapshotsToDisk")) ? ".j2c" : ".bmp";
3818 }
3819 3815
3820 LLFilePicker::ESaveFilter pick_type; 3816 LLFilePicker::ESaveFilter pick_type;
3821 if (extension == ".j2c") 3817 if (extension == ".j2c")
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp
index e480eb3..327cd57 100644
--- a/linden/indra/newview/llvoavatar.cpp
+++ b/linden/indra/newview/llvoavatar.cpp
@@ -3828,10 +3828,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
3828// AUDIO_STEP_LO_SPEED, AUDIO_STEP_HI_SPEED, 3828// AUDIO_STEP_LO_SPEED, AUDIO_STEP_HI_SPEED,
3829// AUDIO_STEP_LO_GAIN, AUDIO_STEP_HI_GAIN ); 3829// AUDIO_STEP_LO_GAIN, AUDIO_STEP_HI_GAIN );
3830 3830
3831 F32 ambient_volume = gSavedSettings.getF32("AudioLevelAmbient"); 3831 const F32 STEP_VOLUME = 0.5f;
3832 F32 gain = gSavedSettings.getBOOL("MuteAmbient")
3833 ? 0.f
3834 : (.50f * ambient_volume * ambient_volume);
3835 LLUUID& step_sound_id = getStepSound(); 3832 LLUUID& step_sound_id = getStepSound();
3836 3833
3837 LLVector3d foot_pos_global = gAgent.getPosGlobalFromAgent(foot_pos_agent); 3834 LLVector3d foot_pos_global = gAgent.getPosGlobalFromAgent(foot_pos_agent);
@@ -3839,7 +3836,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
3839 if (LLViewerParcelMgr::getInstance()->canHearSound(foot_pos_global) 3836 if (LLViewerParcelMgr::getInstance()->canHearSound(foot_pos_global)
3840 && !LLMuteList::getInstance()->isMuted(getID(), LLMute::flagObjectSounds)) 3837 && !LLMuteList::getInstance()->isMuted(getID(), LLMute::flagObjectSounds))
3841 { 3838 {
3842 gAudiop->triggerSound(step_sound_id, getID(), gain, foot_pos_global); 3839 gAudiop->triggerSound(step_sound_id, getID(), STEP_VOLUME, LLAudioEngine::AUDIO_TYPE_AMBIENT, foot_pos_global);
3843 } 3840 }
3844 } 3841 }
3845 } 3842 }
@@ -4819,8 +4816,8 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL
4819 //else 4816 //else
4820 { 4817 {
4821 LLUUID sound_id = LLUUID(gSavedSettings.getString("UISndTyping")); 4818 LLUUID sound_id = LLUUID(gSavedSettings.getString("UISndTyping"));
4822 F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : gSavedSettings.getF32("AudioLevelSFX"); 4819 gAudiop->triggerSound(sound_id, getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_SFX, char_pos_global);
4823 gAudiop->triggerSound(sound_id, getID(), volume, char_pos_global); 4820
4824 } 4821 }
4825 } 4822 }
4826 } 4823 }
diff --git a/linden/indra/newview/llwindebug.cpp b/linden/indra/newview/llwindebug.cpp
index d2f6748..e48b7bf 100644
--- a/linden/indra/newview/llwindebug.cpp
+++ b/linden/indra/newview/llwindebug.cpp
@@ -704,8 +704,8 @@ void LLWinDebug::generateCrashStacks(struct _EXCEPTION_POINTERS *exception_infop
704 ExInfo.ExceptionPointers = exception_infop; 704 ExInfo.ExceptionPointers = exception_infop;
705 ExInfo.ClientPointers = NULL; 705 ExInfo.ClientPointers = NULL;
706 706
707 writeDumpToFile(MiniDumpNormal, &ExInfo, "SecondLife.dmp"); 707 writeDumpToFile(MiniDumpNormal, &ExInfo, "Imprudence.dmp");
708 writeDumpToFile((MINIDUMP_TYPE)(MiniDumpWithDataSegs | MiniDumpWithIndirectlyReferencedMemory), &ExInfo, "SecondLifePlus.dmp"); 708 writeDumpToFile((MINIDUMP_TYPE)(MiniDumpWithDataSegs | MiniDumpWithIndirectlyReferencedMemory), &ExInfo, "ImprudencePlus.dmp");
709 } 709 }
710 710
711 info = Get_Exception_Info(exception_infop); 711 info = Get_Exception_Info(exception_infop);
diff --git a/linden/indra/newview/skins/default/xui/en-us/alerts.xml b/linden/indra/newview/skins/default/xui/en-us/alerts.xml
index c2d4301..dc9b5ea 100644
--- a/linden/indra/newview/skins/default/xui/en-us/alerts.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/alerts.xml
@@ -385,6 +385,73 @@ Go to the Second Life web site for more information on partnering?
385 Cancel 385 Cancel
386 </option> 386 </option>
387 </alert> 387 </alert>
388 <alert modal="true" name="ClickBuildConstants">
389 <message name="message">
390 The following constants are accepted in this tab:
391
392 XP -- X-axis position
393 YP -- Y-axis position
394 ZP -- Z-axis position
395 XS -- X-axis size
396 YS -- Y-axis size
397 ZS -- Z-axis size
398 XR -- X-axis rotation
399 YR -- Y-axis rotation
400 ZR -- Z-axis rotation
401 CB -- Path cut begin
402 CE -- Path cut end
403 HLW -- Hollow size
404 SKW -- Skew
405 PB -- Slice/Dimple/Profile cut begin
406 PE -- Slice/Dimple/Profile cut end
407 XSH -- X-axis top shear
408 YSH -- Y-axis top shear
409 XHL -- X-axis hole size
410 YHL -- Y-axis hole size
411 XTP -- X-axis taper
412 YTP -- Y-axis taper
413 ROF -- Radius offset
414 REV -- Revolutions
415
416 * -- Multiplication
417 \ -- Division
418 + -- Addition
419 - -- Subtraction
420
421 Examples:
422
423 * Enter &apos;ZP + 20&apos; in the Z-axis position field
424 to move an object up 20 meters.
425 * Enter &apos;XS - YS&apos; in the X-axis size field
426 to subtract the Y size from the X size.
427 </message>
428 </alert>
429 <alert modal="true" name="ClickTextureConstants">
430 <message name="message">
431 The following constants are accepted in this tab:
432
433 TSU -- Repeats per face (horizontal)
434 TSV -- Repeats per face (vertical)
435 TOU -- Offsets per face (horizontal)
436 TOV -- Offsets per face (vertical)
437 TRNS -- Transparency
438 TROT -- Texture rotation
439 GLOW -- Glow
440
441 * -- Multiplication
442 \ -- Division
443 + -- Addition
444 - -- Subtraction
445
446 Examples:
447
448 * Enter &apos;TSU * 4&apos; in horizantal repeats field
449 to increase the amount of repeats by 4x.
450 * Enter &apos;TSV&apos; in the horizontal repeats field
451 to make the horizontal and vertical
452 repeats match.
453 </message>
454 </alert>
388 <alert modal="true" name="ClickWebProfileHelpAvatar"> 455 <alert modal="true" name="ClickWebProfileHelpAvatar">
389 <message name="message"> 456 <message name="message">
390 If this Resident has set a web profile URL then you can: 457 If this Resident has set a web profile URL then you can:
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml b/linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml
index 0c60090..c2eb3c2 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_snapshot.xml
@@ -139,6 +139,8 @@
139 <slider bottom_delta="-20" decimal_digits="0" follows="left|top" height="15" 139 <slider bottom_delta="-20" decimal_digits="0" follows="left|top" height="15"
140 increment="1" initial_val="75" label="Image Quality" left="10" 140 increment="1" initial_val="75" label="Image Quality" left="10"
141 max_val="100" min_val="0" name="image_quality_slider" width="210" /> 141 max_val="100" min_val="0" name="image_quality_slider" width="210" />
142 <check_box bottom_delta="0" follows="left|top" label="High resolution snapshot"
143 left="10" name="high_res_check" />
142 <text bottom_delta="-28" follows="left|top" height="20" left="10" 144 <text bottom_delta="-28" follows="left|top" height="20" left="10"
143 name="layer_type_label" width="50"> 145 name="layer_type_label" width="50">
144 Capture: 146 Capture:
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml
index 742da45..eb9b1c6 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml
@@ -587,7 +587,10 @@
587 mouse_opaque="true" name="edit_object" v_pad="0" width="252"> 587 mouse_opaque="true" name="edit_object" v_pad="0" width="252">
588 Edit object parameters: 588 Edit object parameters:
589 </text> 589 </text>
590 <check_box bottom_delta="-26" follows="left|top" font="SansSerifSmall" height="16" 590 <button bottom_delta="-10" follows="left|top" font="SansSerif" halign="center"
591 height="22" label="?" label_selected="?" right="-8" tool_tip="Object math constants"
592 mouse_opaque="true" name="build_math_constants" scale_image="true" width="22" />
593 <check_box bottom_delta="-16" follows="left|top" font="SansSerifSmall" height="16"
591 initial_value="false" label="Locked" left="8" mouse_opaque="true" 594 initial_value="false" label="Locked" left="8" mouse_opaque="true"
592 name="checkbox locked" 595 name="checkbox locked"
593 tool_tip="Prevents object from being moved or deleted. Frequently useful during building to avoid unintended edits." 596 tool_tip="Prevents object from being moved or deleted. Frequently useful during building to avoid unintended edits."
@@ -614,15 +617,15 @@
614 <spinner bottom_delta="-20" decimal_digits="3" follows="left|top" height="16" 617 <spinner bottom_delta="-20" decimal_digits="3" follows="left|top" height="16"
615 increment="0.01" initial_val="0" label="X" label_width="10" left="10" 618 increment="0.01" initial_val="0" label="X" label_width="10" left="10"
616 max_val="512" min_val="-256" mouse_opaque="true" name="Pos X" 619 max_val="512" min_val="-256" mouse_opaque="true" name="Pos X"
617 text_enabled_color="110, 15, 15, 255" width="87" /> 620 text_enabled_color="110, 15, 15, 255" width="96" />
618 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16" 621 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16"
619 increment="0.01" initial_val="0" label="Y" label_width="10" left="10" 622 increment="0.01" initial_val="0" label="Y" label_width="10" left="10"
620 max_val="512" min_val="-256" mouse_opaque="true" name="Pos Y" 623 max_val="512" min_val="-256" mouse_opaque="true" name="Pos Y"
621 text_enabled_color="0, 100, 40, 255" width="87" /> 624 text_enabled_color="0, 100, 40, 255" width="96" />
622 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16" 625 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16"
623 increment="0.01" initial_val="0" label="Z" label_width="10" left="10" 626 increment="0.01" initial_val="0" label="Z" label_width="10" left="10"
624 max_val="4096" min_val="0" mouse_opaque="true" name="Pos Z" 627 max_val="4096" min_val="0" mouse_opaque="true" name="Pos Z"
625 text_enabled_color="0, 67, 132, 255" width="87" /> 628 text_enabled_color="0, 67, 132, 255" width="96" />
626 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 629 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
627 bottom_delta="-16" drop_shadow_visible="true" follows="left|top" 630 bottom_delta="-16" drop_shadow_visible="true" follows="left|top"
628 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10" 631 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
@@ -632,15 +635,15 @@
632 <spinner bottom_delta="-20" decimal_digits="3" follows="left|top" height="16" 635 <spinner bottom_delta="-20" decimal_digits="3" follows="left|top" height="16"
633 increment="0.01" initial_val="0" label="X" label_width="10" left="10" 636 increment="0.01" initial_val="0" label="X" label_width="10" left="10"
634 max_val="10" min_val="0.01" mouse_opaque="true" name="Scale X" 637 max_val="10" min_val="0.01" mouse_opaque="true" name="Scale X"
635 text_enabled_color="1, 1, 1, 1" width="87" /> 638 text_enabled_color="1, 1, 1, 1" width="96" />
636 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16" 639 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16"
637 increment="0.01" initial_val="0" label="Y" label_width="10" left="10" 640 increment="0.01" initial_val="0" label="Y" label_width="10" left="10"
638 max_val="10" min_val="0.01" mouse_opaque="true" name="Scale Y" 641 max_val="10" min_val="0.01" mouse_opaque="true" name="Scale Y"
639 text_enabled_color="1, 1, 1, 1" width="87" /> 642 text_enabled_color="1, 1, 1, 1" width="96" />
640 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16" 643 <spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16"
641 increment="0.01" initial_val="0" label="Z" label_width="10" left="10" 644 increment="0.01" initial_val="0" label="Z" label_width="10" left="10"
642 max_val="10" min_val="0.01" mouse_opaque="true" name="Scale Z" 645 max_val="10" min_val="0.01" mouse_opaque="true" name="Scale Z"
643 text_enabled_color="1, 1, 1, 1" width="87" /> 646 text_enabled_color="1, 1, 1, 1" width="96" />
644 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 647 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
645 bottom_delta="-16" drop_shadow_visible="true" follows="left|top" 648 bottom_delta="-16" drop_shadow_visible="true" follows="left|top"
646 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10" 649 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
@@ -650,15 +653,15 @@
650 <spinner bottom_delta="-22" decimal_digits="2" follows="left|top" height="16" 653 <spinner bottom_delta="-22" decimal_digits="2" follows="left|top" height="16"
651 increment="1" initial_val="0" label="X" label_width="10" left="10" 654 increment="1" initial_val="0" label="X" label_width="10" left="10"
652 max_val="9999" min_val="-9999" mouse_opaque="true" name="Rot X" 655 max_val="9999" min_val="-9999" mouse_opaque="true" name="Rot X"
653 text_enabled_color="1, 1, 1, 1" width="87" /> 656 text_enabled_color="1, 1, 1, 1" width="96" />
654 <spinner bottom_delta="-18" decimal_digits="2" follows="left|top" height="16" 657 <spinner bottom_delta="-18" decimal_digits="2" follows="left|top" height="16"
655 increment="1" initial_val="0" label="Y" label_width="10" left="10" 658 increment="1" initial_val="0" label="Y" label_width="10" left="10"
656 max_val="9999" min_val="-9999" mouse_opaque="true" name="Rot Y" 659 max_val="9999" min_val="-9999" mouse_opaque="true" name="Rot Y"
657 text_enabled_color="1, 1, 1, 1" width="87" /> 660 text_enabled_color="1, 1, 1, 1" width="96" />
658 <spinner bottom_delta="-18" decimal_digits="2" follows="left|top" height="16" 661 <spinner bottom_delta="-18" decimal_digits="2" follows="left|top" height="16"
659 increment="1" initial_val="0" label="Z" label_width="10" left="10" 662 increment="1" initial_val="0" label="Z" label_width="10" left="10"
660 max_val="9999" min_val="-9999" mouse_opaque="true" name="Rot Z" 663 max_val="9999" min_val="-9999" mouse_opaque="true" name="Rot Z"
661 text_enabled_color="1, 1, 1, 1" width="87" /> 664 text_enabled_color="1, 1, 1, 1" width="96" />
662 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 665 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
663 bottom_delta="-16" drop_shadow_visible="true" follows="left|top" 666 bottom_delta="-16" drop_shadow_visible="true" follows="left|top"
664 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10" 667 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
@@ -748,12 +751,12 @@
748 Skew 751 Skew
749 </text> 752 </text>
750 <spinner bottom_delta="-20" decimal_digits="1" follows="left|top" height="16" 753 <spinner bottom_delta="-20" decimal_digits="1" follows="left|top" height="16"
751 increment="5" initial_val="0" left="121" max_val="95" min_val="0" 754 increment="5" initial_val="0" left="121" max_val="95" min_val="0"
752 mouse_opaque="true" name="Scale 1" width="68" /> 755 mouse_opaque="true" name="Scale 1" width="68" label=" " label_width="10"/>
753 <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16" 756 <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16"
754 increment="0.05" initial_val="0" left_delta="73" max_val="0.95" 757 increment="0.05" initial_val="0" left_delta="73" max_val="0.95" label_width="10"
755 min_val="-0.95" mouse_opaque="true" name="Skew" width="68" /> 758 min_val="-0.95" mouse_opaque="true" name="Skew" width="68" label=" " />
756 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 759 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
757 bottom_delta="-15" drop_shadow_visible="true" follows="left|top" 760 bottom_delta="-15" drop_shadow_visible="true" follows="left|top"
758 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="121" 761 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="121"
759 mouse_opaque="true" name="Hollow Shape" v_pad="0" width="141"> 762 mouse_opaque="true" name="Hollow Shape" v_pad="0" width="141">
@@ -872,10 +875,10 @@
872 </text> 875 </text>
873 <spinner bottom_delta="-19" decimal_digits="3" follows="left|top" height="16" 876 <spinner bottom_delta="-19" decimal_digits="3" follows="left|top" height="16"
874 increment="0.05" initial_val="0" left="121" max_val="1" min_val="-1" 877 increment="0.05" initial_val="0" left="121" max_val="1" min_val="-1"
875 mouse_opaque="true" name="Radius Offset" width="68" /> 878 mouse_opaque="true" name="Radius Offset" width="68" label=" " label_width="10" />
876 <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16" 879 <spinner bottom_delta="0" decimal_digits="2" follows="left|top" height="16"
877 increment="0.1" initial_val="1" left_delta="73" max_val="4" min_val="1" 880 increment="0.1" initial_val="1" left_delta="73" max_val="4" min_val="1"
878 mouse_opaque="true" name="Revolutions" width="68" /> 881 mouse_opaque="true" name="Revolutions" width="68" label=" " label_width="10" />
879 <texture_picker allow_no_texture="false" bottom="-211" can_apply_immediately="true" 882 <texture_picker allow_no_texture="false" bottom="-211" can_apply_immediately="true"
880 default_image_name="Default" follows="left|top" height="141" 883 default_image_name="Default" follows="left|top" height="141"
881 label="Sculpt Texture" left="121" mouse_opaque="true" 884 label="Sculpt Texture" left="121" mouse_opaque="true"
@@ -1018,7 +1021,7 @@
1018 </text> 1021 </text>
1019 <spinner bottom_delta="-20" decimal_digits="0" follows="left|top" height="16" 1022 <spinner bottom_delta="-20" decimal_digits="0" follows="left|top" height="16"
1020 increment="2" initial_val="0" left="180" max_val="100" min_val="0" 1023 increment="2" initial_val="0" left="180" max_val="100" min_val="0"
1021 mouse_opaque="true" name="ColorTrans" width="80" /> 1024 mouse_opaque="true" name="ColorTrans" width="58" />
1022 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 1025 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
1023 bottom_delta="-12" drop_shadow_visible="true" follows="left|top" 1026 bottom_delta="-12" drop_shadow_visible="true" follows="left|top"
1024 font="SansSerifSmall" h_pad="0" halign="left" height="10" 1027 font="SansSerifSmall" h_pad="0" halign="left" height="10"
@@ -1027,7 +1030,7 @@
1027 </text> 1030 </text>
1028 <spinner bottom_delta="-20" decimal_digits="2" follows="left|top" height="16" 1031 <spinner bottom_delta="-20" decimal_digits="2" follows="left|top" height="16"
1029 increment="0.1" initial_val="0" left="180" max_val="1" 1032 increment="0.1" initial_val="0" left="180" max_val="1"
1030 min_val="0" mouse_opaque="true" name="glow" width="80" /> 1033 min_val="0" mouse_opaque="true" name="glow" width="58" />
1031 <check_box bottom_delta="-23" follows="left|top" font="SansSerifSmall" height="16" 1034 <check_box bottom_delta="-23" follows="left|top" font="SansSerifSmall" height="16"
1032 initial_value="false" label="Full Bright" left="180" mouse_opaque="true" 1035 initial_value="false" label="Full Bright" left="180" mouse_opaque="true"
1033 name="checkbox fullbright" width="81" /> 1036 name="checkbox fullbright" width="81" />
@@ -1201,6 +1204,9 @@
1201 <button bottom="-360" follows="left|top" font="SansSerifSmall" halign="center" 1204 <button bottom="-360" follows="left|top" font="SansSerifSmall" halign="center"
1202 height="16" label="Align" label_selected="Align" left="112" 1205 height="16" label="Align" label_selected="Align" left="112"
1203 mouse_opaque="true" name="button align" scale_image="TRUE" width="68" /> 1206 mouse_opaque="true" name="button align" scale_image="TRUE" width="68" />
1207 <button bottom="-162" follows="left|top" font="SansSerif" halign="center"
1208 height="22" label="?" label_selected="?" right="-8" tool_tip="Texture math constants"
1209 mouse_opaque="true" name="texture_math_constants" scale_image="true" width="24" />
1204 </panel> 1210 </panel>
1205 <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367" 1211 <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367"
1206 label="Content" left="1" mouse_opaque="false" name="Contents" width="270"> 1212 label="Content" left="1" mouse_opaque="false" name="Contents" width="270">
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml b/linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml
index acbe4f4..d16c22c 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_pie_attachment.xml
@@ -25,14 +25,19 @@
25 <on_click function="Attachment.Detach" /> 25 <on_click function="Attachment.Detach" />
26 <on_enable function="Attachment.EnableDetach" /> 26 <on_enable function="Attachment.EnableDetach" />
27 </menu_item_call> 27 </menu_item_call>
28 <menu_item_call enabled="false" label="Drop" mouse_opaque="true" name="Drop"> 28 <menu_item_separator />
29 <on_click function="Attachment.Drop" /> 29 <menu_item_separator />
30 <on_enable function="Attachment.EnableDrop" /> 30 <menu_item_separator />
31 </menu_item_call> 31 <menu_item_separator />
32 <menu_item_separator />
32 <menu_item_call enabled="false" label="Edit..." mouse_opaque="true" name="Edit..."> 33 <menu_item_call enabled="false" label="Edit..." mouse_opaque="true" name="Edit...">
33 <on_click function="Object.Edit" /> 34 <on_click function="Object.Edit" />
34 <on_enable function="EnableEdit" /> 35 <on_enable function="EnableEdit" />
35 </menu_item_call> 36 </menu_item_call>
37 <menu_item_call enabled="false" label="Drop" mouse_opaque="true" name="Drop">
38 <on_click function="Attachment.Drop" />
39 <on_enable function="Attachment.EnableDrop" />
40 </menu_item_call>
36 </pie_menu> 41 </pie_menu>
37 <menu_item_call enabled="true" label="Appearance..." name="Appearance..."> 42 <menu_item_call enabled="true" label="Appearance..." name="Appearance...">
38 <on_click function="ShowFloater" userdata="appearance" /> 43 <on_click function="ShowFloater" userdata="appearance" />
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_pie_avatar.xml b/linden/indra/newview/skins/default/xui/en-us/menu_pie_avatar.xml
index c8d8ed6..2d44dab 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_pie_avatar.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_pie_avatar.xml
@@ -10,7 +10,9 @@
10 <menu_item_call enabled="false" label="Go To" mouse_opaque="true" name="Go To"> 10 <menu_item_call enabled="false" label="Go To" mouse_opaque="true" name="Go To">
11 <on_click function="GoToObject" /> 11 <on_click function="GoToObject" />
12 </menu_item_call> 12 </menu_item_call>
13 <menu_item_separator /> 13 <menu_item_call enabled="false" label="Abuse..." mouse_opaque="true" name="abuse">
14 <on_click function="Avatar.ReportAbuse" />
15 </menu_item_call>
14 <menu_item_call enabled="false" label="Add Friend..." mouse_opaque="true" name="Add Friend"> 16 <menu_item_call enabled="false" label="Add Friend..." mouse_opaque="true" name="Add Friend">
15 <on_click function="Avatar.AddFriend" /> 17 <on_click function="Avatar.AddFriend" />
16 <on_enable function="Avatar.EnableAddFriend" /> 18 <on_enable function="Avatar.EnableAddFriend" />
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_pie_land.xml b/linden/indra/newview/skins/default/xui/en-us/menu_pie_land.xml
index ee2a431..81ae04f 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_pie_land.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_pie_land.xml
@@ -3,7 +3,7 @@
3 <menu_item_call enabled="false" label="About Land..." mouse_opaque="true" name="About Land..."> 3 <menu_item_call enabled="false" label="About Land..." mouse_opaque="true" name="About Land...">
4 <on_click function="ShowFloater" userdata="about land" /> 4 <on_click function="ShowFloater" userdata="about land" />
5 </menu_item_call> 5 </menu_item_call>
6 <menu_item_call enabled="false" label="Create" mouse_opaque="true" name="Create"> 6 <menu_item_call enabled="false" label="Build" mouse_opaque="true" name="Create">
7 <on_click function="Land.Build" /> 7 <on_click function="Land.Build" />
8 <on_enable function="EnableEdit" /> 8 <on_enable function="EnableEdit" />
9 </menu_item_call> 9 </menu_item_call>
@@ -13,7 +13,9 @@
13 <menu_item_call enabled="false" label="Sit Here" mouse_opaque="true" name="Sit Here"> 13 <menu_item_call enabled="false" label="Sit Here" mouse_opaque="true" name="Sit Here">
14 <on_click function="Land.Sit" /> 14 <on_click function="Land.Sit" />
15 </menu_item_call> 15 </menu_item_call>
16 <menu_item_separator /> 16 <menu_item_call enabled="false" label="Landmark..." mouse_opaque="true" name="Add Landmark">
17 <on_click function="Land.NewLandmark" />
18 </menu_item_call>
17 <menu_item_call enabled="false" label="Buy Pass..." mouse_opaque="true" name="Land Buy Pass"> 19 <menu_item_call enabled="false" label="Buy Pass..." mouse_opaque="true" name="Land Buy Pass">
18 <on_click function="Land.BuyPass" /> 20 <on_click function="Land.BuyPass" />
19 <on_enable function="Land.EnableBuyPass" /> 21 <on_enable function="Land.EnableBuyPass" />
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml b/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml
index e471115..b63e007 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml
@@ -25,48 +25,48 @@
25 <on_enable function="EnablePayObject" /> 25 <on_enable function="EnablePayObject" />
26 </menu_item_call> 26 </menu_item_call>
27 <pie_menu label="More &gt;" name="More &gt;"> 27 <pie_menu label="More &gt;" name="More &gt;">
28 <menu_item_call enabled="false" label="Delete" mouse_opaque="true" name="Delete"> 28 <menu_item_call enabled="false" label="Build" mouse_opaque="true" name="Create">
29 <on_click function="Object.Delete" /> 29 <on_click function="Object.Build" />
30 <on_enable function="Object.EnableDelete" /> 30 <on_enable function="EnableEdit" />
31 </menu_item_call> 31 </menu_item_call>
32 <menu_item_call enabled="false" label="Wear" mouse_opaque="true" name="Wear"> 32 <menu_item_call enabled="false" label="Wear" mouse_opaque="true" name="Wear">
33 <on_click function="Object.AttachToAvatar" /> 33 <on_click function="Object.AttachToAvatar" />
34 <on_enable function="Object.EnableWear" /> 34 <on_enable function="Object.EnableWear" />
35 </menu_item_call> 35 </menu_item_call>
36 <menu_item_call enabled="false" label="Take Copy" mouse_opaque="true" name="Take Copy"> 36 <menu_item_call enabled="false" label="Take Copy" mouse_opaque="true" name="Take Copy">
37 <on_click function="Tools.TakeCopy" /> 37 <on_click function="Tools.TakeCopy" />
38 <on_enable function="Tools.EnableTakeCopy" /> 38 <on_enable function="Tools.EnableTakeCopy" />
39 </menu_item_call> 39 </menu_item_call>
40 <pie_menu label="Attach HUD &gt;" name="Object Attach HUD" /> 40 <pie_menu label="Attach HUD &gt;" name="Object Attach HUD" />
41 <pie_menu label="Attach &gt;" name="Object Attach" /> 41 <pie_menu label="Attach &gt;" name="Object Attach" />
42 <menu_item_call enabled="false" label="Return..." mouse_opaque="true" name="Return..."> 42 <menu_item_call enabled="false" label="Return..." mouse_opaque="true" name="Return...">
43 <on_click function="Object.Return" /> 43 <on_click function="Object.Return" />
44 <on_enable function="Object.EnableReturn" /> 44 <on_enable function="Object.EnableReturn" />
45 </menu_item_call> 45 </menu_item_call>
46 <pie_menu label="More &gt;" name="Rate Menu"> 46 <pie_menu label="More &gt;" name="Rate Menu">
47 <menu_item_separator /> 47 <menu_item_separator />
48 <menu_item_separator /> 48 <menu_item_separator />
49 <menu_item_call enabled="false" label="Report Abuse..." mouse_opaque="true" 49 <menu_item_call enabled="false" label="Abuse..." mouse_opaque="true"
50 name="Report Abuse..."> 50 name="Report Abuse...">
51 <on_click function="Object.ReportAbuse" /> 51 <on_click function="Object.ReportAbuse" />
52 <on_enable function="Object.EnableReportAbuse" /> 52 <on_enable function="Object.EnableReportAbuse" />
53 </menu_item_call> 53 </menu_item_call>
54 <menu_item_separator /> 54 <menu_item_separator />
55 <menu_item_separator /> 55 <menu_item_separator />
56 <menu_item_call enabled="false" label="Mute" mouse_opaque="true" name="Object Mute"> 56 <menu_item_call enabled="false" label="Mute" mouse_opaque="true" name="Object Mute">
57 <on_click function="Object.Mute" /> 57 <on_click function="Object.Mute" />
58 <on_enable function="Object.EnableMute" /> 58 <on_enable function="Object.EnableMute" />
59 </menu_item_call> 59 </menu_item_call>
60 <menu_item_separator /> 60 <menu_item_separator />
61 <menu_item_call enabled="true" label="Inspect" mouse_opaque="true" name="Object Inspect"> 61 <menu_item_call enabled="true" label="Inspect" mouse_opaque="true" name="Object Inspect">
62 <on_click function="Object.Inspect" /> 62 <on_click function="Object.Inspect" />
63 <on_enable function="Object.EnableInspect" /> 63 <on_enable function="Object.EnableInspect" />
64 </menu_item_call> 64 </menu_item_call>
65 </pie_menu> 65 </pie_menu>
66 <menu_item_call enabled="false" label="Create" mouse_opaque="true" name="Create"> 66 <menu_item_call enabled="false" label="Delete" mouse_opaque="true" name="Delete">
67 <on_click function="Object.Build" /> 67 <on_click function="Object.Delete" />
68 <on_enable function="EnableEdit" /> 68 <on_enable function="Object.EnableDelete" />
69 </menu_item_call> 69 </menu_item_call>
70 </pie_menu> 70 </pie_menu>
71 <menu_item_call enabled="false" label="Edit..." mouse_opaque="true" name="Edit..."> 71 <menu_item_call enabled="false" label="Edit..." mouse_opaque="true" name="Edit...">
72 <on_click function="Object.Edit" /> 72 <on_click function="Object.Edit" />
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_pie_self.xml b/linden/indra/newview/skins/default/xui/en-us/menu_pie_self.xml
index 1a6c66c..4fb7262 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_pie_self.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_pie_self.xml
@@ -6,83 +6,85 @@
6 <menu_item_call enabled="true" label="Groups..." name="Groups..."> 6 <menu_item_call enabled="true" label="Groups..." name="Groups...">
7 <on_click function="ShowAgentGroups" userdata="agent" /> 7 <on_click function="ShowAgentGroups" userdata="agent" />
8 </menu_item_call> 8 </menu_item_call>
9 <pie_menu enabled="true" label="Take Off &gt;" name="Take Off &gt;"> 9 <menu_item_call enabled="true" label="Inventory" name="Inventory">
10 <pie_menu enabled="true" label="Clothes &gt;" name="Clothes &gt;"> 10 <on_click function="ShowFloater" userdata="inventory" />
11 <menu_item_call bottom="-29" enabled="false" height="19" label="Shirt" left="0" 11 </menu_item_call>
12 <menu_item_call enabled="true" label="Stand Up" name="Stand Up">
13 <on_click function="Self.StandUp" userdata="" />
14 <on_enable function="Self.EnableStandUp" />
15 </menu_item_call>
16 <menu_item_call enabled="true" label="Friends..." name="Friends...">
17 <on_click function="ShowFloater" userdata="friends" />
18 </menu_item_call>
19 <menu_item_call enabled="true" label="Gestures..." name="Gestures...">
20 <on_click function="ShowFloater" userdata="gestures" />
21 </menu_item_call>
22 <pie_menu enabled="true" label="Take Off &gt;" name="Take Off &gt;">
23 <pie_menu enabled="true" label="Clothes &gt;" name="Clothes &gt;">
24 <menu_item_call bottom="-29" enabled="false" height="19" label="Shirt" left="0"
12 mouse_opaque="true" name="Shirt" width="118"> 25 mouse_opaque="true" name="Shirt" width="118">
13 <on_click function="Edit.TakeOff" userdata="shirt" /> 26 <on_click function="Edit.TakeOff" userdata="shirt" />
14 <on_enable function="Edit.EnableTakeOff" userdata="shirt" /> 27 <on_enable function="Edit.EnableTakeOff" userdata="shirt" />
15 </menu_item_call> 28 </menu_item_call>
16 <menu_item_call bottom="-48" enabled="false" height="19" label="Pants" left="0" 29 <menu_item_call bottom="-48" enabled="false" height="19" label="Pants" left="0"
17 mouse_opaque="true" name="Pants" width="118"> 30 mouse_opaque="true" name="Pants" width="118">
18 <on_click function="Edit.TakeOff" userdata="pants" /> 31 <on_click function="Edit.TakeOff" userdata="pants" />
19 <on_enable function="Edit.EnableTakeOff" userdata="pants" /> 32 <on_enable function="Edit.EnableTakeOff" userdata="pants" />
20 </menu_item_call> 33 </menu_item_call>
21 <menu_item_call bottom="-67" enabled="false" height="19" label="Shoes" left="0" 34 <menu_item_call bottom="-67" enabled="false" height="19" label="Shoes" left="0"
22 mouse_opaque="true" name="Shoes" width="118"> 35 mouse_opaque="true" name="Shoes" width="118">
23 <on_click function="Edit.TakeOff" userdata="shoes" /> 36 <on_click function="Edit.TakeOff" userdata="shoes" />
24 <on_enable function="Edit.EnableTakeOff" userdata="shoes" /> 37 <on_enable function="Edit.EnableTakeOff" userdata="shoes" />
25 </menu_item_call> 38 </menu_item_call>
26 <menu_item_call bottom="-86" enabled="false" height="19" label="Socks" left="0" 39 <menu_item_call bottom="-86" enabled="false" height="19" label="Socks" left="0"
27 mouse_opaque="true" name="Socks" width="118"> 40 mouse_opaque="true" name="Socks" width="118">
28 <on_click function="Edit.TakeOff" userdata="socks" /> 41 <on_click function="Edit.TakeOff" userdata="socks" />
29 <on_enable function="Edit.EnableTakeOff" userdata="socks" /> 42 <on_enable function="Edit.EnableTakeOff" userdata="socks" />
30 </menu_item_call> 43 </menu_item_call>
31 <menu_item_call bottom="-105" enabled="false" height="19" label="Jacket" left="0" 44 <menu_item_call bottom="-105" enabled="false" height="19" label="Jacket" left="0"
32 mouse_opaque="true" name="Jacket" width="118"> 45 mouse_opaque="true" name="Jacket" width="118">
33 <on_click function="Edit.TakeOff" userdata="jacket" /> 46 <on_click function="Edit.TakeOff" userdata="jacket" />
34 <on_enable function="Edit.EnableTakeOff" userdata="jacket" /> 47 <on_enable function="Edit.EnableTakeOff" userdata="jacket" />
35 </menu_item_call> 48 </menu_item_call>
36 <menu_item_call bottom="-124" enabled="false" height="19" label="Gloves" left="0" 49 <menu_item_call bottom="-124" enabled="false" height="19" label="Gloves" left="0"
37 mouse_opaque="true" name="Gloves" width="118"> 50 mouse_opaque="true" name="Gloves" width="118">
38 <on_click function="Edit.TakeOff" userdata="gloves" /> 51 <on_click function="Edit.TakeOff" userdata="gloves" />
39 <on_enable function="Edit.EnableTakeOff" userdata="gloves" /> 52 <on_enable function="Edit.EnableTakeOff" userdata="gloves" />
40 </menu_item_call> 53 </menu_item_call>
41 <pie_menu enabled="true" label="More &gt;" name="More &gt;"> 54 <pie_menu enabled="true" label="More &gt;" name="More &gt;">
42 <menu_item_call bottom="-143" enabled="false" height="19" label="Undershirt" left="0" 55 <menu_item_call bottom="-143" enabled="false" height="19" label="Undershirt" left="0"
43 mouse_opaque="true" name="Self Undershirt" width="118"> 56 mouse_opaque="true" name="Self Undershirt" width="118">
44 <on_click function="Edit.TakeOff" userdata="undershirt" /> 57 <on_click function="Edit.TakeOff" userdata="undershirt" />
45 <on_enable function="Edit.EnableTakeOff" userdata="undershirt" /> 58 <on_enable function="Edit.EnableTakeOff" userdata="undershirt" />
46 </menu_item_call> 59 </menu_item_call>
47 <menu_item_separator /> 60 <menu_item_separator />
48 <menu_item_call bottom="-200" enabled="true" height="19" label="All Clothes" left="0" 61 <menu_item_call bottom="-200" enabled="true" height="19" label="All Clothes" left="0"
49 mouse_opaque="true" name="All Clothes" width="118"> 62 mouse_opaque="true" name="All Clothes" width="118">
50 <on_click function="Edit.TakeOff" userdata="all" /> 63 <on_click function="Edit.TakeOff" userdata="all" />
51 </menu_item_call> 64 </menu_item_call>
52 <menu_item_separator /> 65 <menu_item_separator />
53 <menu_item_call bottom="-162" enabled="false" height="19" label="Underpants" left="0" 66 <menu_item_call bottom="-162" enabled="false" height="19" label="Underpants" left="0"
54 mouse_opaque="true" name="Self Underpants" width="118"> 67 mouse_opaque="true" name="Self Underpants" width="118">
55 <on_click function="Edit.TakeOff" userdata="underpants" /> 68 <on_click function="Edit.TakeOff" userdata="underpants" />
56 <on_enable function="Edit.EnableTakeOff" userdata="underpants" /> 69 <on_enable function="Edit.EnableTakeOff" userdata="underpants" />
57 </menu_item_call> 70 </menu_item_call>
58 </pie_menu> 71 </pie_menu>
59 <menu_item_call bottom="-181" enabled="false" height="19" label="Skirt" left="0" 72 <menu_item_call bottom="-181" enabled="false" height="19" label="Skirt" left="0"
60 mouse_opaque="true" name="Skirt" width="118"> 73 mouse_opaque="true" name="Skirt" width="118">
61 <on_click function="Edit.TakeOff" userdata="skirt" /> 74 <on_click function="Edit.TakeOff" userdata="skirt" />
62 <on_enable function="Edit.EnableTakeOff" userdata="skirt" /> 75 <on_enable function="Edit.EnableTakeOff" userdata="skirt" />
63 </menu_item_call> 76 </menu_item_call>
64 </pie_menu> 77 </pie_menu>
65 <menu_item_separator /> 78 <menu_item_separator />
66 <pie_menu enabled="true" label="HUD &gt;" name="Object Detach HUD" /> 79 <pie_menu enabled="true" label="HUD &gt;" name="Object Detach HUD" />
67 <menu_item_separator /> 80 <menu_item_separator />
68 <pie_menu enabled="true" label="Detach &gt;" name="Object Detach" /> 81 <pie_menu enabled="true" label="Detach &gt;" name="Object Detach" />
69 <menu_item_separator /> 82 <menu_item_separator />
70 <menu_item_call enabled="true" label="Detach All" name="Detach All"> 83 <menu_item_call enabled="true" label="Detach All" name="Detach All">
71 <on_click function="Self.RemoveAllAttachments" userdata="" /> 84 <on_click function="Self.RemoveAllAttachments" userdata="" />
72 <on_enable function="Self.EnableRemoveAllAttachments" /> 85 <on_enable function="Self.EnableRemoveAllAttachments" />
73 </menu_item_call> 86 </menu_item_call>
74 </pie_menu> 87 </pie_menu>
75 <menu_item_call enabled="true" label="Stand Up" name="Stand Up">
76 <on_click function="Self.StandUp" userdata="" />
77 <on_enable function="Self.EnableStandUp" />
78 </menu_item_call>
79 <menu_item_call enabled="true" label="Friends..." name="Friends...">
80 <on_click function="ShowFloater" userdata="friends" />
81 </menu_item_call>
82 <menu_item_call enabled="true" label="Gestures..." name="Gestures...">
83 <on_click function="ShowFloater" userdata="gestures" />
84 </menu_item_call>
85 <menu_item_separator />
86 <menu_item_call enabled="true" label="Appearance..." name="Appearance..."> 88 <menu_item_call enabled="true" label="Appearance..." name="Appearance...">
87 <on_click function="ShowFloater" userdata="appearance" /> 89 <on_click function="ShowFloater" userdata="appearance" />
88 <on_enable function="Edit.EnableCustomizeAvatar" /> 90 <on_enable function="Edit.EnableCustomizeAvatar" />
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
index 48f59de..89c1fe8 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
@@ -127,8 +127,7 @@
127 </menu_item_call> 127 </menu_item_call>
128 <menu_item_separator /> 128 <menu_item_separator />
129 <menu_item_call name="Duplicate" enabled="false" 129 <menu_item_call name="Duplicate" enabled="false"
130 label="Duplicate" 130 label="Duplicate">
131 shortcut="control|D">
132 <on_click function="Edit.Duplicate" userdata="" /> 131 <on_click function="Edit.Duplicate" userdata="" />
133 <on_enable function="Edit.EnableDuplicate" /> 132 <on_enable function="Edit.EnableDuplicate" />
134 </menu_item_call> 133 </menu_item_call>
@@ -205,6 +204,12 @@
205 userdata="all" /> 204 userdata="all" />
206 </menu_item_call> 205 </menu_item_call>
207 </menu> 206 </menu>
207 <menu_item_call name="Refresh Appearance"
208 label="Refresh Appearance"
209 shortcut="control|alt|R">
210 <on_click function="Advanced.RebakeTextures"
211 userdata="" />
212 </menu_item_call>
208 <menu_item_separator /> 213 <menu_item_separator />
209 <menu_item_call name="Gestures..." label="Gestures..." 214 <menu_item_call name="Gestures..." label="Gestures..."
210 shortcut="control|G"> 215 shortcut="control|G">
@@ -489,7 +494,7 @@
489 <on_check control="FlyBtnState" /> 494 <on_check control="FlyBtnState" />
490 </menu_item_check> 495 </menu_item_check>
491 <menu_item_separator /> 496 <menu_item_separator />
492 <menu_item_call name="Create Landmark Here" 497 <menu_item_call name="Create Landmark Here" shortcut="control|D"
493 label="Create Landmark Here"> 498 label="Create Landmark Here">
494 <on_click function="World.CreateLandmark" userdata="" /> 499 <on_click function="World.CreateLandmark" userdata="" />
495 <on_enable function="World.EnableCreateLandmark" userdata="" /> 500 <on_enable function="World.EnableCreateLandmark" userdata="" />
@@ -932,24 +937,13 @@
932 937
933 <menu_item_separator /> 938 <menu_item_separator />
934 939
935 <menu_item_check name="High-res Snapshot" 940
936 label="High-res Snapshot">
937 <on_click function="ToggleControl"
938 userdata="HighResSnapshot" />
939 <on_check control="HighResSnapshot" />
940 </menu_item_check>
941 <menu_item_check name="Quiet Snapshots to Disk" 941 <menu_item_check name="Quiet Snapshots to Disk"
942 label="Quiet Snapshots to Disk"> 942 label="Quiet Snapshots to Disk">
943 <on_click function="ToggleControl" 943 <on_click function="ToggleControl"
944 userdata="QuietSnapshotsToDisk" /> 944 userdata="QuietSnapshotsToDisk" />
945 <on_check control="QuietSnapshotsToDisk" /> 945 <on_check control="QuietSnapshotsToDisk" />
946 </menu_item_check> 946 </menu_item_check>
947 <menu_item_check name="Compress Snapshots to Disk"
948 label="Compress Snapshots to Disk">
949 <on_click function="ToggleControl"
950 userdata="CompressSnapshotsToDisk" />
951 <on_check control="CompressSnapshotsToDisk" />
952 </menu_item_check>
953 <menu_item_check name="Show Mouselook Crosshairs" 947 <menu_item_check name="Show Mouselook Crosshairs"
954 label="Show Mouselook Crosshairs"> 948 label="Show Mouselook Crosshairs">
955 <on_click function="ToggleControl" 949 <on_click function="ToggleControl"
@@ -1619,7 +1613,8 @@
1619 userdata="" /> 1613 userdata="" />
1620 </menu_item_call> 1614 </menu_item_call>
1621 <menu_item_check name="Show XUI Names" 1615 <menu_item_check name="Show XUI Names"
1622 label="Show XUI Names"> 1616 label="Show XUI Names"
1617 shortcut="control|shift|x">
1623 <on_click function="Advanced.ToggleXUINames" 1618 <on_click function="Advanced.ToggleXUINames"
1624 userdata="" /> 1619 userdata="" />
1625 <on_check function="Advanced.CheckXUINames" 1620 <on_check function="Advanced.CheckXUINames"
@@ -1835,12 +1830,6 @@
1835 <on_click function="Advanced.DumpAttachments" 1830 <on_click function="Advanced.DumpAttachments"
1836 userdata="" /> 1831 userdata="" />
1837 </menu_item_call> 1832 </menu_item_call>
1838 <menu_item_call name="Rebake Textures"
1839 label="Rebake Textures"
1840 shortcut="control|alt|R">
1841 <on_click function="Advanced.RebakeTextures"
1842 userdata="" />
1843 </menu_item_call>
1844 </menu> 1833 </menu>
1845 1834
1846 1835
@@ -1963,12 +1952,6 @@
1963 userdata="LimitSelectDistance" /> 1952 userdata="LimitSelectDistance" />
1964 <on_check control="LimitSelectDistance" /> 1953 <on_check control="LimitSelectDistance" />
1965 </menu_item_check> 1954 </menu_item_check>
1966 <menu_item_check name="Disable Camera Constraints"
1967 label="Disable Camera Constraints">
1968 <on_click function="ToggleControl"
1969 userdata="DisableCameraConstraints" />
1970 <on_check control="DisableCameraConstraints" />
1971 </menu_item_check>
1972 <menu_item_check name="Mouse Smoothing" 1955 <menu_item_check name="Mouse Smoothing"
1973 label="Mouse Smoothing"> 1956 label="Mouse Smoothing">
1974 <on_click function="ToggleControl" 1957 <on_click function="ToggleControl"
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml
index 67d3307..092daab 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml
@@ -76,6 +76,10 @@
76 font="SansSerifSmall" height="16" initial_value="false" 76 font="SansSerifSmall" height="16" initial_value="false"
77 label="Rotate Mini-Map" left="151" mouse_opaque="true" 77 label="Rotate Mini-Map" left="151" mouse_opaque="true"
78 name="rotate_mini_map_checkbox" radio_style="false" width="256" /> 78 name="rotate_mini_map_checkbox" radio_style="false" width="256" />
79 <check_box bottom="-286" control_name="MiniMapTeleport" enabled="true" follows="left|top"
80 font="SansSerifSmall" height="16" initial_value="false"
81 label="Doubleclick Mini-Map Teleports" left="280" mouse_opaque="true"
82 name="teleport_mini_map_checkbox" radio_style="false" width="256" />
79 <check_box bottom="-304" control_name="NotifyMoneyChange" enabled="true" 83 <check_box bottom="-304" control_name="NotifyMoneyChange" enabled="true"
80 follows="left|top" font="SansSerifSmall" height="16" initial_value="false" 84 follows="left|top" font="SansSerifSmall" height="16" initial_value="false"
81 label="Notify when Linden dollars (L$) spent or received" left="151" 85 label="Notify when Linden dollars (L$) spent or received" left="151"
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml
index 23e357f..1867323 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml
@@ -79,18 +79,23 @@
79 label="Automatic Appearance Camera Movement" left="148" mouse_opaque="true" 79 label="Automatic Appearance Camera Movement" left="148" mouse_opaque="true"
80 name="appearance camera movement" radio_style="false" 80 name="appearance camera movement" radio_style="false"
81 tool_tip="Use automatic camera positioning while in edit mode" width="242" /> 81 tool_tip="Use automatic camera positioning while in edit mode" width="242" />
82 <check_box bottom_delta="-18" control_name="DisableCameraConstraints" enabled="true"
83 follows="left|top" font="SansSerifSmall" height="16" initial_value="false"
84 label="Disable camera constraints" left="148" mouse_opaque="true"
85 name="Disable camera constraints" radio_style="false"
86 tool_tip="Disables camera limits such as distance and terrain" width="242" />
82 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 87 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
83 bottom="-228" drop_shadow_visible="true" enabled="true" follows="left|top" 88 bottom_delta="-32" drop_shadow_visible="true" enabled="true" follows="left|top"
84 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10" 89 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10"
85 mouse_opaque="true" name="text2" v_pad="0" width="128"> 90 mouse_opaque="true" name="text2" v_pad="0" width="128">
86 Avatar Display Options: 91 Avatar Display Options:
87 </text> 92 </text>
88 <check_box bottom="-232" control_name="FirstPersonAvatarVisible" enabled="true" 93 <check_box bottom_delta="-4" control_name="FirstPersonAvatarVisible" enabled="true"
89 follows="left|top" font="SansSerifSmall" height="16" initial_value="false" 94 follows="left|top" font="SansSerifSmall" height="16" initial_value="false"
90 label="Show Avatar in Mouselook" left="148" mouse_opaque="true" name="avfp" 95 label="Show Avatar in Mouselook" left="148" mouse_opaque="true" name="avfp"
91 radio_style="false" width="256" /> 96 radio_style="false" width="256" />
92 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 97 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
93 bottom="-264" drop_shadow_visible="true" enabled="true" follows="left|top" 98 bottom_delta="-32" drop_shadow_visible="true" enabled="true" follows="left|top"
94 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10" 99 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10"
95 mouse_opaque="true" name="text5" v_pad="0" width="128"> 100 mouse_opaque="true" name="text5" v_pad="0" width="128">
96 Joystick Options: 101 Joystick Options:
diff --git a/linden/indra/newview/skins/default/xui/en-us/strings.xml b/linden/indra/newview/skins/default/xui/en-us/strings.xml
index e8c341e..ecacc78 100644
--- a/linden/indra/newview/skins/default/xui/en-us/strings.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/strings.xml
@@ -1,180 +1,183 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<!-- This file contains strings that used to be hardcoded in the source. 2<!-- This file contains strings that used to be hardcoded in the source.
3 It is only for those strings which don't belong in a floater. 3 It is only for those strings which don't belong in a floater.
4 For example, the strings used in avatar chat bubbles, and strings 4 For example, the strings used in avatar chat bubbles, and strings
5 that are returned from one component and may appear in many places--> 5 that are returned from one component and may appear in many places-->
6<strings> 6<strings>
7 7
8 <!-- Login --> 8 <!-- Login -->
9 <string name="LoginInProgress">Logging in. [APP_NAME] may appear frozen. Please wait.</string> 9 <string name="LoginInProgress">Logging in. [APP_NAME] may appear frozen. Please wait.</string>
10 <string name="LoginAuthenticating">Authenticating</string> 10 <string name="LoginAuthenticating">Authenticating</string>
11 <string name="LoginMaintenance">Performing account maintenance...</string> 11 <string name="LoginMaintenance">Performing account maintenance...</string>
12 <string name="LoginAttempt">Previous login attempt failed. Logging in, attempt [NUMBER]</string> 12 <string name="LoginAttempt">Previous login attempt failed. Logging in, attempt [NUMBER]</string>
13 <string name="LoginPrecaching">Loading world...</string> 13 <string name="LoginPrecaching">Loading world...</string>
14 <string name="LoginInitializingBrowser">Initializing embedded web browser...</string> 14 <string name="LoginInitializingBrowser">Initializing embedded web browser...</string>
15 <string name="LoginInitializingMultimedia">Initializing multimedia...</string> 15 <string name="LoginInitializingMultimedia">Initializing multimedia...</string>
16 <string name="LoginVerifyingCache">Verifying cache files (can take 60-90 seconds)...</string> 16 <string name="LoginVerifyingCache">Verifying cache files (can take 60-90 seconds)...</string>
17 <string name="LoginProcessingResponse">Processing Response...</string> 17 <string name="LoginProcessingResponse">Processing Response...</string>
18 <string name="LoginInitializingWorld">Initializing World...</string> 18 <string name="LoginInitializingWorld">Initializing World...</string>
19 <string name="LoginDecodingImages">Decoding images...</string> 19 <string name="LoginDecodingImages">Decoding images...</string>
20 <string name="LoginInitializingQuicktime">Initializing QuickTime...</string> 20 <string name="LoginInitializingQuicktime">Initializing QuickTime...</string>
21 <string name="LoginQuicktimeNotFound">QuickTime not found - unable to initialize.</string> 21 <string name="LoginQuicktimeNotFound">QuickTime not found - unable to initialize.</string>
22 <string name="LoginQuicktimeOK">QuickTime initialized successfully.</string> 22 <string name="LoginQuicktimeOK">QuickTime initialized successfully.</string>
23 <string name="LoginWaitingForRegionHandshake">Waiting for region handshake...</string> 23 <string name="LoginWaitingForRegionHandshake">Waiting for region handshake...</string>
24 <string name="LoginConnectingToRegion">Connecting to region...</string> 24 <string name="LoginConnectingToRegion">Connecting to region...</string>
25 <string name="LoginDownloadingClothing">Downloading clothing...</string> 25 <string name="LoginDownloadingClothing">Downloading clothing...</string>
26 <string name="LoginFailedNoNetwork">Network Error: Could not establish connection, please check your network connection.</string> 26 <string name="LoginFailedNoNetwork">Network Error: Could not establish connection, please check your network connection.</string>
27 27
28 28
29 <!-- Disconnection --> 29 <!-- Disconnection -->
30 <string name="AgentLostConnection">This region may be experiencing trouble. Please check your connection to the Internet.</string> 30 <string name="AgentLostConnection">This region may be experiencing trouble. Please check your connection to the Internet.</string>
31 31
32 32
33 <!-- Tooltip, llhoverview.cpp --> 33 <!-- Tooltip, llhoverview.cpp -->
34 <string name="TooltipPerson">Person</string><!-- Object under mouse pointer is an avatar --> 34 <string name="TooltipPerson">Person</string><!-- Object under mouse pointer is an avatar -->
35 <string name="TooltipNoName">(no name)</string> <!-- No name on an object --> 35 <string name="TooltipNoName">(no name)</string> <!-- No name on an object -->
36 <string name="TooltipOwner">Owner:</string> <!-- Owner name follows --> 36 <string name="TooltipOwner">Owner:</string> <!-- Owner name follows -->
37 <string name="TooltipPublic">Public</string> <!-- Public permissions on an object --> 37 <string name="TooltipPublic">Public</string> <!-- Public permissions on an object -->
38 <string name="TooltipIsGroup">(Group)</string> <!-- The name before this text is that of a group --> 38 <string name="TooltipIsGroup">(Group)</string> <!-- The name before this text is that of a group -->
39 <string name="TooltipFlagScript">Script</string> 39 <string name="TooltipFlagScript">Script</string>
40 <string name="TooltipFlagPhysics">Physics</string> 40 <string name="TooltipFlagPhysics">Physics</string>
41 <string name="TooltipFlagTouch">Touch</string> 41 <string name="TooltipFlagTouch">Touch</string>
42 <string name="TooltipFlagL$">L$</string> 42 <string name="TooltipFlagL$">L$</string>
43 <string name="TooltipFlagDropInventory">Drop Inventory</string> 43 <string name="TooltipFlagDropInventory">Drop Inventory</string>
44 <string name="TooltipFlagPhantom">Phantom</string> 44 <string name="TooltipFlagPhantom">Phantom</string>
45 <string name="TooltipFlagTemporary">Temporary</string> 45 <string name="TooltipFlagTemporary">Temporary</string>
46 <string name="TooltipFlagRightClickMenu">(Right-click for menu)</string> 46 <string name="TooltipFlagRightClickMenu">(Right-click for menu)</string>
47 <string name="TooltipFreeToCopy">Free to copy</string> 47 <string name="TooltipFreeToCopy">Free to copy</string>
48 <string name="TooltipForSaleL$">For Sale: L$[AMOUNT]</string> <!-- L$ version --> 48 <string name="TooltipForSaleL$">For Sale: L$[AMOUNT]</string> <!-- L$ version -->
49 <string name="TooltipForSaleMsg">For Sale: [MESSAGE]</string> <!-- Message (RetrievingData) --> 49 <string name="TooltipForSaleMsg">For Sale: [MESSAGE]</string> <!-- Message (RetrievingData) -->
50 <string name="TooltipFlagGroupBuild">Group Build</string> 50 <string name="TooltipFlagGroupBuild">Group Build</string>
51 <string name="TooltipFlagNoBuild">No Build</string> 51 <string name="TooltipFlagNoBuild">No Build</string>
52 <string name="TooltipFlagNoEdit">Group Build</string> 52 <string name="TooltipFlagNoEdit">Group Build</string>
53 <string name="TooltipFlagNotSafe">Not Safe</string><!-- damage area --> 53 <string name="TooltipFlagNotSafe">Not Safe</string><!-- damage area -->
54 <string name="TooltipFlagNoFly">No Fly</string> 54 <string name="TooltipFlagNoFly">No Fly</string>
55 <string name="TooltipFlagGroupScripts">Group Scripts</string> 55 <string name="TooltipFlagGroupScripts">Group Scripts</string>
56 <string name="TooltipFlagNoScripts">No Scripts</string> 56 <string name="TooltipFlagNoScripts">No Scripts</string>
57 <string name="TooltipLand">Land:</string> 57 <string name="TooltipLand">Land:</string>
58 <string name="TooltipMustSingleDrop">Only a single item can be dragged here</string> 58 <string name="TooltipMustSingleDrop">Only a single item can be dragged here</string>
59 59
60 60
61 <!-- Indicates that an avatar's name or other similar datum is being retrieved. General usage. --> 61 <!-- Indicates that an avatar's name or other similar datum is being retrieved. General usage. -->
62 <string name="RetrievingData">Retrieving...</string> 62 <string name="RetrievingData">Retrieving...</string>
63 63
64 <string name="ReleaseNotes">Release Notes</string> 64 <string name="ReleaseNotes">Release Notes</string>
65 65
66 <!-- Indicates something is being loaded. Maybe should be merged with RetrievingData --> 66 <!-- Indicates something is being loaded. Maybe should be merged with RetrievingData -->
67 <string name="LoadingData">Loading...</string> 67 <string name="LoadingData">Loading...</string>
68 68
69 69
70 <!-- namecache --> 70 <!-- namecache -->
71 <!-- Avatar name: text shown for LLUUID::null --> 71 <!-- Avatar name: text shown for LLUUID::null -->
72 <string name="AvatarNameNobody">(nobody)</string> 72 <string name="AvatarNameNobody">(nobody)</string>
73 73
74 <!-- Avatar name: text shown while fetching name --> 74 <!-- Avatar name: text shown while fetching name -->
75 <string name="AvatarNameWaiting">(waiting)</string> 75 <string name="AvatarNameWaiting">(waiting)</string>
76 76
77 <!-- Avatar name: text shown as an alternative to AvatarNameFetching, easter egg. --> 77 <!-- Avatar name: text shown as an alternative to AvatarNameFetching, easter egg. -->
78 <string name="AvatarNameHippos">(hippos)</string> 78 <string name="AvatarNameHippos">(hippos)</string>
79 79
80 <!-- Group name: text shown for LLUUID::null --> 80 <!-- Group name: text shown for LLUUID::null -->
81 <string name="GroupNameNone">(none)</string> 81 <string name="GroupNameNone">(none)</string>
82 82
83 <!-- Asset errors. Used in llassetstorage.cpp, translation from error code to error message. --> 83 <!-- Asset errors. Used in llassetstorage.cpp, translation from error code to error message. -->
84 <string name="AssetErrorNone">No error</string> 84 <string name="AssetErrorNone">No error</string>
85 <string name="AssetErrorRequestFailed">Asset request: failed</string> 85 <string name="AssetErrorRequestFailed">Asset request: failed</string>
86 <string name="AssetErrorNonexistentFile">Asset request: non-existent file</string> 86 <string name="AssetErrorNonexistentFile">Asset request: non-existent file</string>
87 <string name="AssetErrorNotInDatabase">Asset request: asset not found in database</string> 87 <string name="AssetErrorNotInDatabase">Asset request: asset not found in database</string>
88 <string name="AssetErrorEOF">End of file</string> 88 <string name="AssetErrorEOF">End of file</string>
89 <string name="AssetErrorCannotOpenFile">Cannot open file</string> 89 <string name="AssetErrorCannotOpenFile">Cannot open file</string>
90 <string name="AssetErrorFileNotFound">File not found</string> 90 <string name="AssetErrorFileNotFound">File not found</string>
91 <string name="AssetErrorTCPTimeout">File transfer timeout</string> 91 <string name="AssetErrorTCPTimeout">File transfer timeout</string>
92 <string name="AssetErrorCircuitGone">Circuit gone</string> 92 <string name="AssetErrorCircuitGone">Circuit gone</string>
93 <string name="AssetErrorUnknownStatus">Unknown status</string> 93 <string name="AssetErrorUnknownStatus">Unknown status</string>
94 94
95 <!-- llvoavatar. Displayed in the avatar's chat bubble --> 95 <!-- llvoavatar. Displayed in the avatar's chat bubble -->
96 <string name="AvatarEditingApparance">(Editing Appearance)</string> 96 <string name="AvatarEditingApparance">(Editing Appearance)</string>
97 <string name="AvatarAway">Away</string> 97 <string name="AvatarAway">Away</string>
98 <string name="AvatarBusy">Busy</string> 98 <string name="AvatarBusy">Busy</string>
99 <string name="AvatarMuted">Muted</string> 99 <string name="AvatarMuted">Muted</string>
100 100
101 <!-- animations --> 101 <!-- animations -->
102 <string name="anim_express_afraid">Afraid</string> 102 <string name="anim_express_afraid">Afraid</string>
103 <string name="anim_express_anger">Angry</string> 103 <string name="anim_express_anger">Angry</string>
104 <string name="anim_away">Away</string> 104 <string name="anim_away">Away</string>
105 <string name="anim_backflip">Backflip</string> 105 <string name="anim_backflip">Backflip</string>
106 <string name="anim_express_laugh">Belly Laugh</string> 106 <string name="anim_express_laugh">Belly Laugh</string>
107 <string name="anim_express_toothsmile">BigSmile</string> 107 <string name="anim_express_toothsmile">BigSmile</string>
108 <string name="anim_blowkiss">Blow Kiss</string> 108 <string name="anim_blowkiss">Blow Kiss</string>
109 <string name="anim_express_bored">Bored</string> 109 <string name="anim_express_bored">Bored</string>
110 <string name="anim_bow">Bow</string> 110 <string name="anim_bow">Bow</string>
111 <string name="anim_clap">Clap</string> 111 <string name="anim_clap">Clap</string>
112 <string name="anim_courtbow">Court Bow</string> 112 <string name="anim_courtbow">Court Bow</string>
113 <string name="anim_express_cry">Cry</string> 113 <string name="anim_express_cry">Cry</string>
114 <string name="anim_dance1">Dance 1</string> 114 <string name="anim_dance1">Dance 1</string>
115 <string name="anim_dance2">Dance 2</string> 115 <string name="anim_dance2">Dance 2</string>
116 <string name="anim_dance3">Dance 3</string> 116 <string name="anim_dance3">Dance 3</string>
117 <string name="anim_dance4">Dance 4</string> 117 <string name="anim_dance4">Dance 4</string>
118 <string name="anim_dance5">Dance 5</string> 118 <string name="anim_dance5">Dance 5</string>
119 <string name="anim_dance6">Dance 6</string> 119 <string name="anim_dance6">Dance 6</string>
120 <string name="anim_dance7">Dance 7</string> 120 <string name="anim_dance7">Dance 7</string>
121 <string name="anim_dance8">Dance 8</string> 121 <string name="anim_dance8">Dance 8</string>
122 <string name="anim_express_disdain">Disdain</string> 122 <string name="anim_express_disdain">Disdain</string>
123 <string name="anim_drink">Drink</string> 123 <string name="anim_drink">Drink</string>
124 <string name="anim_express_embarrased">Embarrassed</string> 124 <string name="anim_express_embarrased">Embarrassed</string>
125 <string name="anim_angry_fingerwag">Finger Wag</string> 125 <string name="anim_angry_fingerwag">Finger Wag</string>
126 <string name="anim_fist_pump">Fist Pump</string> 126 <string name="anim_fist_pump">Fist Pump</string>
127 <string name="anim_yoga_float">Floating Yoga</string> 127 <string name="anim_yoga_float">Floating Yoga</string>
128 <string name="anim_express_frown">Frown</string> 128 <string name="anim_express_frown">Frown</string>
129 <string name="anim_impatient">Impatient</string> 129 <string name="anim_impatient">Impatient</string>
130 <string name="anim_jumpforjoy">Jump For Joy</string> 130 <string name="anim_jumpforjoy">Jump For Joy</string>
131 <string name="anim_kissmybutt">Kiss My Butt</string> 131 <string name="anim_kissmybutt">Kiss My Butt</string>
132 <string name="anim_express_kiss">Kiss</string> 132 <string name="anim_express_kiss">Kiss</string>
133 <string name="anim_laugh_short">Laugh</string> 133 <string name="anim_laugh_short">Laugh</string>
134 <string name="anim_musclebeach">Muscle Beach</string> 134 <string name="anim_musclebeach">Muscle Beach</string>
135 <string name="anim_no_unhappy">No (Unhappy)</string> 135 <string name="anim_no_unhappy">No (Unhappy)</string>
136 <string name="anim_no_head">No</string> 136 <string name="anim_no_head">No</string>
137 <string name="anim_nyanya">Nya-nya-nya</string> 137 <string name="anim_nyanya">Nya-nya-nya</string>
138 <string name="anim_punch_onetwo">One-Two Punch</string> 138 <string name="anim_punch_onetwo">One-Two Punch</string>
139 <string name="anim_express_open_mouth">Open Mouth</string> 139 <string name="anim_express_open_mouth">Open Mouth</string>
140 <string name="anim_peace">Peace</string> 140 <string name="anim_peace">Peace</string>
141 <string name="anim_point_you">Point at Other</string> 141 <string name="anim_point_you">Point at Other</string>
142 <string name="anim_point_me">Point at Self</string> 142 <string name="anim_point_me">Point at Self</string>
143 <string name="anim_punch_l">Punch Left</string> 143 <string name="anim_punch_l">Punch Left</string>
144 <string name="anim_punch_r">Punch Right</string> 144 <string name="anim_punch_r">Punch Right</string>
145 <string name="anim_rps_countdown">RPS count</string> 145 <string name="anim_rps_countdown">RPS count</string>
146 <string name="anim_rps_paper">RPS paper</string> 146 <string name="anim_rps_paper">RPS paper</string>
147 <string name="anim_rps_rock">RPS rock</string> 147 <string name="anim_rps_rock">RPS rock</string>
148 <string name="anim_rps_scissors">RPS scissors</string> 148 <string name="anim_rps_scissors">RPS scissors</string>
149 <string name="anim_express_repulsed">Repulsed</string> 149 <string name="anim_express_repulsed">Repulsed</string>
150 <string name="anim_kick_roundhouse_r">Roundhouse Kick</string> 150 <string name="anim_kick_roundhouse_r">Roundhouse Kick</string>
151 <string name="anim_express_sad">Sad</string> 151 <string name="anim_express_sad">Sad</string>
152 <string name="anim_salute">Salute</string> 152 <string name="anim_salute">Salute</string>
153 <string name="anim_shout">Shout</string> 153 <string name="anim_shout">Shout</string>
154 <string name="anim_express_shrug">Shrug</string> 154 <string name="anim_express_shrug">Shrug</string>
155 <string name="anim_express_smile">Smile</string> 155 <string name="anim_express_smile">Smile</string>
156 <string name="anim_smoke_idle">Smoke Idle</string> 156 <string name="anim_smoke_idle">Smoke Idle</string>
157 <string name="anim_smoke_inhale">Smoke Inhale</string> 157 <string name="anim_smoke_inhale">Smoke Inhale</string>
158 <string name="anim_smoke_throw_down">Smoke Throw Down</string> 158 <string name="anim_smoke_throw_down">Smoke Throw Down</string>
159 <string name="anim_express_surprise">Surprise</string> 159 <string name="anim_express_surprise">Surprise</string>
160 <string name="anim_sword_strike_r">Sword Strike</string> 160 <string name="anim_sword_strike_r">Sword Strike</string>
161 <string name="anim_angry_tantrum">Tantrum</string> 161 <string name="anim_angry_tantrum">Tantrum</string>
162 <string name="anim_express_tongue_out">TongueOut</string> 162 <string name="anim_express_tongue_out">TongueOut</string>
163 <string name="anim_hello">Wave</string> 163 <string name="anim_hello">Wave</string>
164 <string name="anim_whisper">Whisper</string> 164 <string name="anim_whisper">Whisper</string>
165 <string name="anim_whistle">Whistle</string> 165 <string name="anim_whistle">Whistle</string>
166 <string name="anim_express_wink">Wink</string> 166 <string name="anim_express_wink">Wink</string>
167 <string name="anim_wink_hollywood">Wink (Hollywood)</string> 167 <string name="anim_wink_hollywood">Wink (Hollywood)</string>
168 <string name="anim_express_worry">Worry</string> 168 <string name="anim_express_worry">Worry</string>
169 <string name="anim_yes_happy">Yes (Happy)</string> 169 <string name="anim_yes_happy">Yes (Happy)</string>
170 <string name="anim_yes_head">Yes</string> 170 <string name="anim_yes_head">Yes</string>
171 171
172 <string name="texture_loading">Loading...</string> 172 <string name="texture_loading">Loading...</string>
173 <string name="worldmap_offline">Offline</string> 173 <string name="worldmap_offline">Offline</string>
174 174
175 <!-- Chat --> 175 <!-- Chat -->
176 <string name="whisper">whispers:</string> 176 <string name="whisper">whispers:</string>
177 <string name="shout">shouts:</string> 177 <string name="shout">shouts:</string>
178 178
179</strings> 179 <!-- System messages -->
180 180 <string name="landmark_created">You created a landmark at</string>
181
182</strings>
183
diff --git a/linden/indra/newview/skins/silver/colors_base.xml b/linden/indra/newview/skins/silver/colors_base.xml
index dabada6..b6e77be 100644
--- a/linden/indra/newview/skins/silver/colors_base.xml
+++ b/linden/indra/newview/skins/silver/colors_base.xml
@@ -100,9 +100,9 @@
100<PieMenuSelectedColor value="185, 200, 220, 120" /> <!-- Color of pie menu slice when selected --> 100<PieMenuSelectedColor value="185, 200, 220, 120" /> <!-- Color of pie menu slice when selected -->
101 101
102<!-- MENU BAR --> 102<!-- MENU BAR -->
103<ParcelTextColor value="40, 40, 90, 255" /> <!-- Parcel name on menu bar, normal state --> 103<ParcelTextColor value="40, 40, 90, 255" /> <!-- Parcel name on menu bar, normal state -->
104<ParcelHoverColor value="70, 70, 100, 255" /> <!-- Parcel name on menu bar, hover state --> 104<ParcelHoverColor value="70, 70, 100, 255" /> <!-- Parcel name on menu bar, hover state -->
105<TimeTextColor value="0, 30, 60, 255" /> <!-- SL Time on menu bar --> 105<TimeTextColor value="0, 30, 60, 255" /> <!-- SL Time on menu bar -->
106<BalanceTextColor value="0, 100, 40, 255" /> <!-- Linden dollar balance on menu bar --> 106<BalanceTextColor value="0, 100, 40, 255" /> <!-- Linden dollar balance on menu bar -->
107<HealthTextColor value="110, 15, 15, 255" /> <!-- Damage meter text on menu bar --> 107<HealthTextColor value="110, 15, 15, 255" /> <!-- Damage meter text on menu bar -->
108 108
diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py
index 62c9537..d8261c2 100755
--- a/linden/indra/newview/viewer_manifest.py
+++ b/linden/indra/newview/viewer_manifest.py
@@ -44,6 +44,16 @@ class ViewerManifest(LLManifest):
44 self.exclude("*.svn*") 44 self.exclude("*.svn*")
45 self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg") 45 self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg")
46 self.path(src="../../etc/message.xml", dst="app_settings/message.xml") 46 self.path(src="../../etc/message.xml", dst="app_settings/message.xml")
47 self.path(src="../../../ChangeLog.txt", dst="doc/ChangeLog.txt")
48 self.path(src="../../../CONTRIBUTE.txt", dst="doc/CONTRIBUTE.txt")
49 self.path(src="../../../MANIFESTO.txt", dst="doc/MANIFESTO.txt")
50 self.path(src="../../../README.txt", dst="doc/README.txt")
51 self.path(src="../../../RELEASE_NOTES.txt", dst="doc/RELEASE_NOTES.txt")
52 self.path(src="../../doc/contributions.txt", dst="doc/ll-contributions.txt")
53 self.path(src="../../doc/FLOSS-exception.txt", dst="doc/FLOSS-exception.txt")
54 self.path(src="../../doc/GPL-license.txt", dst="doc/GPL-license.txt")
55 self.path(src="../../doc/releasenotes-where.txt", dst="doc/ll-releasenotes-where.txt")
56#
47 57
48 if self.prefix(src="app_settings"): 58 if self.prefix(src="app_settings"):
49 self.exclude("logcontrol.xml") 59 self.exclude("logcontrol.xml")
@@ -171,9 +181,9 @@ class WindowsManifest(ViewerManifest):
171 def final_exe(self): 181 def final_exe(self):
172 if self.default_channel(): 182 if self.default_channel():
173 if self.default_grid(): 183 if self.default_grid():
174 return "Imprudence.exe" 184 return "imprudence.exe"
175 else: 185 else:
176 return "ImprudencePreview.exe" 186 return "imprudencepreview.exe"
177 else: 187 else:
178 return ''.join(self.channel().split()) + '.exe' 188 return ''.join(self.channel().split()) + '.exe'
179 189
@@ -183,14 +193,6 @@ class WindowsManifest(ViewerManifest):
183 # the final exe is complicated because we're not sure where it's coming from, 193 # the final exe is complicated because we're not sure where it's coming from,
184 # nor do we have a fixed name for the executable 194 # nor do we have a fixed name for the executable
185 self.path(self.find_existing_file('debug/imprudence-bin.exe', 'release/imprudence-bin.exe', 'relwithdebinfo/imprudence-bin.exe'), dst=self.final_exe()) 195 self.path(self.find_existing_file('debug/imprudence-bin.exe', 'release/imprudence-bin.exe', 'relwithdebinfo/imprudence-bin.exe'), dst=self.final_exe())
186 # need to get the kdu dll from any of the build directories as well
187 #self.path(self.find_existing_file(
188 # *FIX:Mani we need to add support for packaging specific targets.
189 #'../llkdu/debug/llkdu.dll',
190 #'../llkdu/release/llkdu.dll',
191 #'../llkdu/relwithdebinfo/llkdu.dll',
192 #'../../libraries/i686-win32/lib/release/llkdu.dll'),
193 # dst='llkdu.dll')
194 196
195 self.gather_documents() 197 self.gather_documents()
196 198
@@ -212,6 +214,12 @@ class WindowsManifest(ViewerManifest):
212 self.path("openjpeg.dll") 214 self.path("openjpeg.dll")
213 self.end_prefix() 215 self.end_prefix()
214 216
217 # For sound
218 if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""):
219 self.path("openal32.dll")
220 self.path("alut.dll")
221 self.end_prefix()
222
215 # Mozilla appears to force a dependency on these files so we need to ship it (CP) 223 # Mozilla appears to force a dependency on these files so we need to ship it (CP)
216 self.path("msvcr71.dll") 224 self.path("msvcr71.dll")
217 self.path("msvcp71.dll") 225 self.path("msvcp71.dll")
@@ -244,18 +252,20 @@ class WindowsManifest(ViewerManifest):
244 self.end_prefix() 252 self.end_prefix()
245 253
246 # Vivox runtimes 254 # Vivox runtimes
247 #if self.prefix(src="vivox-runtime/i686-win32", dst=""): 255 if self.prefix(src="vivox-runtime/i686-win32", dst=""):
256 # self.path("alut.dll")
257 self.path("wrap_oal.dll")
258
248 # self.path("SLVoice.exe") 259 # self.path("SLVoice.exe")
249 # self.path("SLVoiceAgent.exe") 260 # self.path("SLVoiceAgent.exe")
250 # self.path("libeay32.dll") 261 # self.path("libeay32.dll")
251 # self.path("srtp.dll") 262 # self.path("srtp.dll")
252 # self.path("ssleay32.dll") 263 # self.path("ssleay32.dll")
253 # self.path("tntk.dll") 264 # self.path("tntk.dll")
254 # self.path("alut.dll")
255 # self.path("vivoxsdk.dll") 265 # self.path("vivoxsdk.dll")
256 # self.path("ortp.dll") 266 # self.path("ortp.dll")
257 # self.path("wrap_oal.dll") 267
258 # self.end_prefix() 268 self.end_prefix()
259 269
260# # pull in the crash logger and updater from other projects 270# # pull in the crash logger and updater from other projects
261# self.path(src=self.find_existing_file( # tag:"crash-logger" here as a cue to the exporter 271# self.path(src=self.find_existing_file( # tag:"crash-logger" here as a cue to the exporter
@@ -440,17 +450,15 @@ class DarwinManifest(ViewerManifest):
440 self.path("Japanese.lproj") 450 self.path("Japanese.lproj")
441 self.path("Korean.lproj") 451 self.path("Korean.lproj")
442 452
453
443 # SLVoice and vivox lols 454 # SLVoice and vivox lols
444 #self.path("vivox-runtime/universal-darwin/libalut.dylib", "libalut.dylib") 455 self.path("vivox-runtime/universal-darwin/libalut.dylib", "libalut.dylib")
445 #self.path("vivox-runtime/universal-darwin/libopenal.dylib", "libopenal.dylib") 456 self.path("vivox-runtime/universal-darwin/libopenal.dylib", "libopenal.dylib")
446 #self.path("vivox-runtime/universal-darwin/libortp.dylib", "libortp.dylib") 457 #self.path("vivox-runtime/universal-darwin/libortp.dylib", "libortp.dylib")
447 #self.path("vivox-runtime/universal-darwin/libvivoxsdk.dylib", "libvivoxsdk.dylib") 458 #self.path("vivox-runtime/universal-darwin/libvivoxsdk.dylib", "libvivoxsdk.dylib")
448 #self.path("vivox-runtime/universal-darwin/SLVoice", "SLVoice") 459 #self.path("vivox-runtime/universal-darwin/SLVoice", "SLVoice")
449 #self.path("vivox-runtime/universal-darwin/SLVoiceAgent.app", "SLVoiceAgent.app") 460 #self.path("vivox-runtime/universal-darwin/SLVoiceAgent.app", "SLVoiceAgent.app")
450 461
451 # llkdu dynamic library
452# self.path("../../libraries/universal-darwin/lib_release/libllkdu.dylib", "libllkdu.dylib")
453
454 #libfmodwrapper.dylib 462 #libfmodwrapper.dylib
455 #self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib") 463 #self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib")
456 464
@@ -658,7 +666,6 @@ class Linux_i686Manifest(LinuxManifest):
658 self.path("app_settings/mozilla-runtime-linux-i686") 666 self.path("app_settings/mozilla-runtime-linux-i686")
659 667
660 if self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"): 668 if self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"):
661# self.path("libkdu_v42R.so")
662# self.path("libfmod-3.75.so") 669# self.path("libfmod-3.75.so")
663 self.path("libapr-1.so.0") 670 self.path("libapr-1.so.0")
664 self.path("libaprutil-1.so.0") 671 self.path("libaprutil-1.so.0")
@@ -673,19 +680,19 @@ class Linux_i686Manifest(LinuxManifest):
673 self.path("libopenjpeg.so.2") 680 self.path("libopenjpeg.so.2")
674 #self.path("libtcmalloc.so.0") - bugged 681 #self.path("libtcmalloc.so.0") - bugged
675 #self.path("libstacktrace.so.0") - probably bugged 682 #self.path("libstacktrace.so.0") - probably bugged
676# self.path("libllkdu.so", "../bin/libllkdu.so") # llkdu goes in bin for some reason
677 self.end_prefix("lib") 683 self.end_prefix("lib")
678 684
679 # Vivox runtimes 685 # Vivox runtimes
680 #if self.prefix(src="vivox-runtime/i686-linux", dst="bin"): 686 #if self.prefix(src="vivox-runtime/i686-linux", dst="bin"):
681 # self.path("SLVoice") 687 # self.path("SLVoice")
682 # self.end_prefix() 688 # self.end_prefix()
683 #if self.prefix(src="vivox-runtime/i686-linux", dst="lib"): 689
684 # self.path("libopenal.so.1") 690 if self.prefix(src="vivox-runtime/i686-linux", dst="lib"):
691 self.path("libopenal.so.1")
692 self.path("libalut.so")
685 # self.path("libortp.so") 693 # self.path("libortp.so")
686 # self.path("libvivoxsdk.so") 694 # self.path("libvivoxsdk.so")
687 # self.path("libalut.so") 695 self.end_prefix("lib")
688 # self.end_prefix("lib")
689 696
690class Linux_x86_64Manifest(LinuxManifest): 697class Linux_x86_64Manifest(LinuxManifest):
691 def construct(self): 698 def construct(self):
diff --git a/linden/install.xml b/linden/install.xml
index a6270be..4d2b5d0 100644
--- a/linden/install.xml
+++ b/linden/install.xml
@@ -368,6 +368,37 @@
368 </map> 368 </map>
369 </map> 369 </map>
370 </map> 370 </map>
371 <key>glib</key>
372 <map>
373 <key>description</key>
374 <string>GLib is a library containing many useful C routines for things such as trees, hashes, and lists.</string>
375 <key>license</key>
376 <string>gpl</string>
377 <key>packages</key>
378 <map>
379 <key>darwin</key>
380 <map>
381 <key>md5sum</key>
382 <string>6cc5ce1fafd10299fdb890b3d4c3cf53</string>
383 <key>url</key>
384 <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/glib-2.0-darwin-20080817.tar.bz2</uri>
385 </map>
386 <key>linux</key>
387 <map>
388 <key>md5sum</key>
389 <string>2f1a9e14f9213c2c9564c1c1cfdd6d47</string>
390 <key>url</key>
391 <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/glib-2.0-linux-20080817.tar.bz2</uri>
392 </map>
393 <key>windows</key>
394 <map>
395 <key>md5sum</key>
396 <string>3d5e29d444dde4815b36082eedfc775a</string>
397 <key>url</key>
398 <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/glib-2.0-windows-20080817.tar.bz2</uri>
399 </map>
400 </map>
401 </map>
371 <key>google</key> 402 <key>google</key>
372 <map> 403 <map>
373 <key>license</key> 404 <key>license</key>
@@ -490,72 +521,6 @@
490 </map> 521 </map>
491 </map> 522 </map>
492 </map> 523 </map>
493 <key>kdu</key>
494 <map>
495 <key>copyright</key>
496 <string>on file</string>
497 <key>description</key>
498 <string>Kakadu (KDU) JPEG-2000 decoder library. </string>
499 <key>license</key>
500 <string>kdu</string>
501 <key>packages</key>
502 <map>
503 <key>darwin</key>
504 <map>
505 <key>md5sum</key>
506 <string>9a91ecd80203a24fb347b1436155b013</string>
507 <key>url</key>
508 <uri>scp:install-packages.lindenlab.com:/local/www/install-packages/doc/kdu-5.2.1-darwin-20080716.tar.bz2</uri>
509 </map>
510 <key>linux</key>
511 <map>
512 <key>md5sum</key>
513 <string>daadd8c268e16f8c5f6145be8596b8b8</string>
514 <key>url</key>
515 <uri>scp:install-packages.lindenlab.com:/local/www/install-packages/doc/kdu-5.2.1-linux-20080716.tar.bz2</uri>
516 </map>
517 <key>windows</key>
518 <map>
519 <key>md5sum</key>
520 <string>15528c24ca657b524d9ab3ccbb33c766</string>
521 <key>url</key>
522 <uri>scp:install-packages.lindenlab.com:/local/www/install-packages/doc/kdu-5.2.1-windows-20080613.tar.bz2</uri>
523 </map>
524 </map>
525 </map>
526 <key>kdu-binaries</key>
527 <map>
528 <key>copyright</key>
529 <string>see kdu</string>
530 <key>description</key>
531 <string>see kdu</string>
532 <key>license</key>
533 <string>kdu</string>
534 <key>packages</key>
535 <map>
536 <key>darwin</key>
537 <map>
538 <key>md5sum</key>
539 <string>480fbeeb47c9b9c4a2f947e310c9821c</string>
540 <key>url</key>
541 <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/kdu-binaries-5.2.1-darwin-20080617.tar.bz2</uri>
542 </map>
543 <key>linux</key>
544 <map>
545 <key>md5sum</key>
546 <string>ca87644e377a6cf16db4ba6dbd2f8689</string>
547 <key>url</key>
548 <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/kdu-binaries-5.2.1-linux-20080617.tar.bz2</uri>
549 </map>
550 <key>windows</key>
551 <map>
552 <key>md5sum</key>
553 <string>87af253b1d76437290355e8e20029377</string>
554 <key>url</key>
555 <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/kdu-binaries-5.2.1-windows-20080617.tar.bz2</uri>
556 </map>
557 </map>
558 </map>
559 <key>libmono</key> 524 <key>libmono</key>
560 <map> 525 <map>
561 <key>copyright</key> 526 <key>copyright</key>
@@ -819,6 +784,39 @@ anguage Infrstructure (CLI) international standard</string>
819 </map> 784 </map>
820 </map> 785 </map>
821 </map> 786 </map>
787 <key>openal</key>
788 <map>
789 <key>copyright</key>
790 <string>Copyright (C) 2008 by authors.</string>
791 <key>description</key>
792 <string>3D Audio library</string>
793 <key>license</key>
794 <string>lgpl</string>
795 <key>packages</key>
796 <map>
797 <key>darwin</key>
798 <map>
799 <key>md5sum</key>
800 <string>a0757244e3e6688fde2ffeea35cc1f96</string>
801 <key>url</key>
802 <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/openal-darwin-20080924.tar.bz2</uri>
803 </map>
804 <key>linux</key>
805 <map>
806 <key>md5sum</key>
807 <string>f0d9a8d1318b519cffe6c40c9cac4e21</string>
808 <key>url</key>
809 <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/openal-linux-20081010c-59a71b14-plughw.tar.bz2</uri>
810 </map>
811 <key>windows</key>
812 <map>
813 <key>md5sum</key>
814 <string>a0757244e3e6688fde2ffeea35cc1f96</string>
815 <key>url</key>
816 <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/openal-windows-20080924.tar.bz2</uri>
817 </map>
818 </map>
819 </map>
822 <key>openSSL</key> 820 <key>openSSL</key>
823 <map> 821 <map>
824 <key>license</key> 822 <key>license</key>