Skip to content
Snippets Groups Projects
Commit 4f565ed0 authored by Monty Brandenberg's avatar Monty Brandenberg
Browse files

Update fmodex to 4.44.31. Move DSP descriptor to heap storage.

parent 9c29000b
No related branches found
No related tags found
No related merge requests found
......@@ -498,9 +498,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>10352aab979c333a52dbad21b6e6fba9</string>
<string>179f3fa55920f0702b5721d52426fe02</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/288119/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>65073109c821db1517860480e570994e</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/288120/arch/Linux/installer/fmodex-4.44.31-linux-20140314.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/288120/arch/CYGWIN/installer/fmodex-4.44.31-windows-20140314.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
......
......@@ -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)
......
......@@ -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
......@@ -320,8 +320,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 +347,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 +363,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 +741,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)
{
......
......@@ -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
......@@ -74,6 +74,7 @@ class LLAudioEngine_FMODEX : public LLAudioEngine
LLWindGen<MIXBUFFERFORMAT> *mWindGen;
FMOD_DSP_DESCRIPTION mWindDSPDesc;
FMOD::DSP *mWindDSP;
FMOD::System *mSystem;
bool mEnableProfiler;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment