summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.hgtags1
-rwxr-xr-xautobuild.xml12
-rwxr-xr-xindra/cmake/Copy3rdPartyLibs.cmake4
-rw-r--r--indra/cmake/FMODEX.cmake2
-rw-r--r--indra/llaudio/llaudioengine_fmodex.cpp25
-rw-r--r--indra/llaudio/llaudioengine_fmodex.h4
-rwxr-xr-xindra/media_plugins/winmmshim/winmm_shim.cpp81
-rw-r--r--indra/newview/VIEWER_VERSION.txt2
-rwxr-xr-xindra/newview/viewer_manifest.py17
9 files changed, 95 insertions, 53 deletions
diff --git a/.hgtags b/.hgtags
index e0242c2afa..aeb1ebadea 100755
--- a/.hgtags
+++ b/.hgtags
@@ -476,3 +476,4 @@ d40c66e410741de7e90b1ed6dac28dd8a2d7e1f6 3.6.8-release
dcb4981ce255841b6083d8f65444b65d5a733a17 3.7.1-release
b842534cb4d76c9ef87676a62b1d2d19e79c015f 3.7.2-release
962d3f98955bfc7310a7867c8cbc3df075e54aa9 3.7.3-release
+d076568ff7883b41c149e6afb421f39c29dbfe2b 3.7.4-release
diff --git a/autobuild.xml b/autobuild.xml
index 3a329d932a..cd2a085520 100755
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -498,9 +498,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>10352aab979c333a52dbad21b6e6fba9</string>
+ <string>862b9244ed8a27bec16b62883fe3580a</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-fmodex-private/rev/274403/arch/Darwin/installer/fmodex-4.44-darwin-20130419.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-fmodex-private/rev/288122/arch/Darwin/installer/fmodex-4.44.31-darwin-20140314.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@@ -510,9 +510,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>79e45527aa9fb90b813599dff5ce01a7</string>
+ <string>180f4d703deec104469e6a9044243110</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-fmodex-private/rev/274378/arch/Linux/installer/fmodex-4.44-linux-20130419.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-fmodex-private/rev/288122/arch/Linux/installer/fmodex-4.44.31-linux-20140315.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
@@ -522,9 +522,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>91752db72202807cffb33c1ec3fd90fc</string>
+ <string>6c859cd17fb8c9cdd96b188c2a2c2838</string>
<key>url</key>
- <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-fmodex-private/rev/276321/arch/CYGWIN/installer/fmodex-4.44-windows-20130521.tar.bz2</string>
+ <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/3p-fmodex-private/rev/288122/arch/CYGWIN/installer/fmodex-4.44.31-windows-20140314.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 44c2d3ac27..f98e88b697 100755
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -64,6 +64,7 @@ if(WINDOWS)
endif(USE_TCMALLOC)
if (FMODEX)
+ set(debug_files ${debug_files} fmodexL.dll)
set(release_files ${release_files} fmodex.dll)
endif (FMODEX)
@@ -294,7 +295,8 @@ elseif(LINUX)
endif (USE_TCMALLOC)
if (FMODEX)
- set(release_file ${release_files} "libfmodex.so")
+ set(debug_files ${debug_files} "libfmodexL.so")
+ set(release_files ${release_files} "libfmodex.so")
endif (FMODEX)
else(WINDOWS)
diff --git a/indra/cmake/FMODEX.cmake b/indra/cmake/FMODEX.cmake
index 65bc1cabeb..163260137b 100644
--- a/indra/cmake/FMODEX.cmake
+++ b/indra/cmake/FMODEX.cmake
@@ -39,7 +39,7 @@ if (FMODEX)
optimized fmodex)
endif (WINDOWS)
set(FMODEX_LIBRARIES ${FMODEX_LIBRARY})
- set(FMODEX_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodex)
+ set(FMODEX_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/)
endif (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR)
endif (STANDALONE)
endif (FMODEX)
diff --git a/indra/llaudio/llaudioengine_fmodex.cpp b/indra/llaudio/llaudioengine_fmodex.cpp
index e9b74b8f41..36e8044a25 100644
--- a/indra/llaudio/llaudioengine_fmodex.cpp
+++ b/indra/llaudio/llaudioengine_fmodex.cpp
@@ -5,7 +5,7 @@
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * Copyright (C) 2014, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -55,11 +55,13 @@ LLAudioEngine_FMODEX::LLAudioEngine_FMODEX(bool enable_profiler)
mWindDSP = NULL;
mSystem = NULL;
mEnableProfiler = enable_profiler;
+ mWindDSPDesc = new FMOD_DSP_DESCRIPTION();
}
LLAudioEngine_FMODEX::~LLAudioEngine_FMODEX()
{
+ delete mWindDSPDesc;
}
@@ -320,8 +322,8 @@ void LLAudioEngine_FMODEX::shutdown()
llinfos << "LLAudioEngine_FMODEX::shutdown() closing FMOD Ex" << llendl;
if ( mSystem ) // speculative fix for MAINT-2657
{
- mSystem->close();
- mSystem->release();
+ mSystem->close();
+ mSystem->release();
}
llinfos << "LLAudioEngine_FMODEX::shutdown() done closing FMOD Ex" << llendl;
@@ -347,15 +349,14 @@ bool LLAudioEngine_FMODEX::initWind()
if (!mWindDSP)
{
- FMOD_DSP_DESCRIPTION dspdesc;
- memset(&dspdesc, 0, sizeof(FMOD_DSP_DESCRIPTION)); //Set everything to zero
- strncpy(dspdesc.name,"Wind Unit", sizeof(dspdesc.name)); //Set name to "Wind Unit"
- dspdesc.channels=2;
- dspdesc.read = &windCallback; //Assign callback.
- if(Check_FMOD_Error(mSystem->createDSP(&dspdesc, &mWindDSP), "FMOD::createDSP"))
+ memset(mWindDSPDesc, 0, sizeof(*mWindDSPDesc)); //Set everything to zero
+ strncpy(mWindDSPDesc->name, "Wind Unit", sizeof(mWindDSPDesc->name));
+ mWindDSPDesc->channels = 2;
+ mWindDSPDesc->read = &windCallback; // Assign callback - may be called from arbitrary threads
+ if (Check_FMOD_Error(mSystem->createDSP(mWindDSPDesc, &mWindDSP), "FMOD::createDSP"))
return false;
- if(mWindGen)
+ if (mWindGen)
delete mWindGen;
float frequency = 44100;
@@ -364,6 +365,7 @@ bool LLAudioEngine_FMODEX::initWind()
mWindDSP->setUserData((void*)mWindGen);
}
+ // *TODO: Should this guard against multiple plays?
if (mWindDSP)
{
mSystem->playDSP(FMOD_CHANNEL_FREE, mWindDSP, false, 0);
@@ -741,6 +743,9 @@ void LLAudioChannelFMODEX::set3DMode(bool use3d)
}
}
+// *NOTE: This is almost certainly being called on the mixer thread,
+// not the main thread. May have implications for callees or audio
+// engine shutdown.
FMOD_RESULT F_CALLBACK windCallback(FMOD_DSP_STATE *dsp_state, float *originalbuffer, float *newbuffer, unsigned int length, int inchannels, int outchannels)
{
diff --git a/indra/llaudio/llaudioengine_fmodex.h b/indra/llaudio/llaudioengine_fmodex.h
index 415a9ed0ef..ca389d489f 100644
--- a/indra/llaudio/llaudioengine_fmodex.h
+++ b/indra/llaudio/llaudioengine_fmodex.h
@@ -5,7 +5,7 @@
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * Copyright (C) 2014, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -41,6 +41,7 @@ namespace FMOD
class Sound;
class DSP;
}
+typedef struct FMOD_DSP_DESCRIPTION FMOD_DSP_DESCRIPTION;
//Interfaces
class LLAudioEngine_FMODEX : public LLAudioEngine
@@ -74,6 +75,7 @@ protected:
LLWindGen<MIXBUFFERFORMAT> *mWindGen;
+ FMOD_DSP_DESCRIPTION *mWindDSPDesc;
FMOD::DSP *mWindDSP;
FMOD::System *mSystem;
bool mEnableProfiler;
diff --git a/indra/media_plugins/winmmshim/winmm_shim.cpp b/indra/media_plugins/winmmshim/winmm_shim.cpp
index aac349bf57..49a1c9dba3 100755
--- a/indra/media_plugins/winmmshim/winmm_shim.cpp
+++ b/indra/media_plugins/winmmshim/winmm_shim.cpp
@@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2010&license=viewerlgpl$
* Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * Copyright (C) 2010-2014, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -30,8 +30,8 @@
using std::wstring;
-static float sVolumeLevel = 1.f;
-static bool sMute = false;
+static float sVolumeLevel = 1.f; // Could be covered by critical section,
+static bool sMute = false; // not needed with atomicity and alignment.
static CRITICAL_SECTION sCriticalSection;
BOOL APIENTRY DllMain( HMODULE hModule,
@@ -39,37 +39,44 @@ BOOL APIENTRY DllMain( HMODULE hModule,
LPVOID lpReserved
)
{
- InitializeCriticalSection(&sCriticalSection);
+ if (DLL_PROCESS_ATTACH == ul_reason_for_call)
+ {
+ InitializeCriticalSection(&sCriticalSection);
+ }
return TRUE;
}
void ll_winmm_shim_initialize(){
- static bool initialized = false;
- // do this only once
- EnterCriticalSection(&sCriticalSection);
+ static volatile bool initialized = false;
+
+ // do this only once using double-check locking
if (!initialized)
- { // bind to original winmm.dll
- TCHAR system_path[MAX_PATH];
- TCHAR dll_path[MAX_PATH];
- ::GetSystemDirectory(system_path, MAX_PATH);
-
- // grab winmm.dll from system path, where it should live
- wsprintf(dll_path, "%s\\winmm.dll", system_path);
- HMODULE winmm_handle = ::LoadLibrary(dll_path);
-
- if (winmm_handle != NULL)
- { // we have a dll, let's get out pointers!
- initialized = true;
- init_function_pointers(winmm_handle);
- ::OutputDebugStringA("WINMM_SHIM.DLL: real winmm.dll initialized successfully\n");
- }
- else
- {
- // failed to initialize real winmm.dll
- ::OutputDebugStringA("WINMM_SHIM.DLL: Failed to initialize real winmm.dll\n");
+ {
+ EnterCriticalSection(&sCriticalSection);
+ if (!initialized)
+ { // bind to original winmm.dll
+ TCHAR system_path[MAX_PATH];
+ TCHAR dll_path[MAX_PATH];
+ ::GetSystemDirectory(system_path, MAX_PATH);
+
+ // grab winmm.dll from system path, where it should live
+ wsprintf(dll_path, "%s\\winmm.dll", system_path);
+ HMODULE winmm_handle = ::LoadLibrary(dll_path);
+
+ if (winmm_handle != NULL)
+ { // we have a dll, let's get out pointers!
+ init_function_pointers(winmm_handle);
+ ::OutputDebugStringA("WINMM_SHIM.DLL: real winmm.dll initialized successfully\n");
+ initialized = true; // Last thing after completing setup
+ }
+ else
+ {
+ // failed to initialize real winmm.dll
+ ::OutputDebugStringA("WINMM_SHIM.DLL: Failed to initialize real winmm.dll\n");
+ }
}
+ LeaveCriticalSection(&sCriticalSection);
}
- LeaveCriticalSection(&sCriticalSection);
}
@@ -84,7 +91,7 @@ extern "C"
int mBitsPerSample;
};
typedef std::map<HWAVEOUT, WaveOutFormat*> wave_out_map_t;
- static wave_out_map_t sWaveOuts;
+ static wave_out_map_t sWaveOuts; // Covered by sCriticalSection
MMRESULT WINAPI waveOutOpen( LPHWAVEOUT phwo, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
{
@@ -100,7 +107,9 @@ extern "C"
&& ((fdwOpen & WAVE_FORMAT_QUERY) == 0)) // not just querying for format support
{ // remember the requested bits per sample, and associate with the given handle
WaveOutFormat* wave_outp = new WaveOutFormat(pwfx->wBitsPerSample);
+ EnterCriticalSection(&sCriticalSection);
sWaveOuts.insert(std::make_pair(*phwo, wave_outp));
+ LeaveCriticalSection(&sCriticalSection);
}
return result;
}
@@ -108,13 +117,15 @@ extern "C"
MMRESULT WINAPI waveOutClose( HWAVEOUT hwo)
{
ll_winmm_shim_initialize();
+ EnterCriticalSection(&sCriticalSection);
wave_out_map_t::iterator found_it = sWaveOuts.find(hwo);
if (found_it != sWaveOuts.end())
{ // forget what we know about this handle
delete found_it->second;
sWaveOuts.erase(found_it);
}
- return waveOutClose_orig( hwo);
+ LeaveCriticalSection(&sCriticalSection);
+ return waveOutClose_orig(hwo);
}
MMRESULT WINAPI waveOutWrite( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh)
@@ -128,11 +139,19 @@ extern "C"
}
else if (sVolumeLevel != 1.f)
{ // need to apply volume level
+ int bits_per_sample(0);
+
+ EnterCriticalSection(&sCriticalSection);
wave_out_map_t::iterator found_it = sWaveOuts.find(hwo);
if (found_it != sWaveOuts.end())
{
- WaveOutFormat* formatp = found_it->second;
- switch (formatp->mBitsPerSample){
+ bits_per_sample = found_it->second->mBitsPerSample;
+ }
+ LeaveCriticalSection(&sCriticalSection);
+ if (bits_per_sample)
+ {
+ switch (bits_per_sample)
+ {
case 8:
{
char volume = (char)(sVolumeLevel * 127.f);
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index 0833a98f14..aaf18d2948 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-3.7.4
+3.7.5
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index fe0774b409..f7b3a45e8d 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -7,7 +7,7 @@
$LicenseInfo:firstyear=2006&license=viewerlgpl$
Second Life Viewer Source Code
-Copyright (C) 2006-2011, Linden Research, Inc.
+Copyright (C) 2006-2014, Linden Research, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -749,7 +749,6 @@ class Darwin_i386_Manifest(ViewerManifest):
"libcollada14dom.dylib",
"libexpat.1.5.2.dylib",
"libexception_handler.dylib",
- "libfmodex.dylib",
"libGLOD.dylib",
):
dylibs += path_optional(os.path.join(libdir, libfile), libfile)
@@ -765,6 +764,20 @@ class Darwin_i386_Manifest(ViewerManifest):
'SLVoice',
):
self.path2basename(libdir, libfile)
+
+ # dylibs that vary based on configuration
+ if self.args['configuration'].lower() == 'debug':
+ for libfile in (
+ "libfmodexL.dylib",
+ ):
+ dylibs += path_optional(os.path.join("../packages/lib/debug",
+ libfile), libfile)
+ else:
+ for libfile in (
+ "libfmodex.dylib",
+ ):
+ dylibs += path_optional(os.path.join("../packages/lib/release",
+ libfile), libfile)
# our apps
for app_bld_dir, app in (("mac_crash_logger", "mac-crash-logger.app"),