summaryrefslogtreecommitdiff
path: root/indra/llaudio
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2014-03-14 20:58:35 -0400
committerMonty Brandenberg <monty@lindenlab.com>2014-03-14 20:58:35 -0400
commitc62d2cca2962f9847f844df137c21aa44edc2d75 (patch)
treeed1b7dc4bf64eb18dfae751d7e7a0a8b3368e435 /indra/llaudio
parent4f565ed077058cd3ce90ffd347c4a8346d734dbd (diff)
Additions & fixes for lib copy, use only forwarded ptrs in LLAE interfaces.
Copy3rdPartyLibs needed to copy the now-corrected fmodexL libraries and it had a bad library reference on Linux for release. In llaudio land, the audio engine interfaces, even the fmodex specializations, seem to want to be external-structure free so use a forward declaration and pointer to FMOD_DSP_DESCRIPTION and deal with it in the ctor/dtor.
Diffstat (limited to 'indra/llaudio')
-rw-r--r--indra/llaudio/llaudioengine_fmodex.cpp12
-rw-r--r--indra/llaudio/llaudioengine_fmodex.h3
2 files changed, 9 insertions, 6 deletions
diff --git a/indra/llaudio/llaudioengine_fmodex.cpp b/indra/llaudio/llaudioengine_fmodex.cpp
index 71f5d47367..36e8044a25 100644
--- a/indra/llaudio/llaudioengine_fmodex.cpp
+++ b/indra/llaudio/llaudioengine_fmodex.cpp
@@ -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;
}
@@ -347,11 +349,11 @@ bool LLAudioEngine_FMODEX::initWind()
if (!mWindDSP)
{
- 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"))
+ 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)
diff --git a/indra/llaudio/llaudioengine_fmodex.h b/indra/llaudio/llaudioengine_fmodex.h
index ca9a6c0df0..ca389d489f 100644
--- a/indra/llaudio/llaudioengine_fmodex.h
+++ b/indra/llaudio/llaudioengine_fmodex.h
@@ -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,7 +75,7 @@ protected:
LLWindGen<MIXBUFFERFORMAT> *mWindGen;
- FMOD_DSP_DESCRIPTION mWindDSPDesc;
+ FMOD_DSP_DESCRIPTION *mWindDSPDesc;
FMOD::DSP *mWindDSP;
FMOD::System *mSystem;
bool mEnableProfiler;