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

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.
parent 4f565ed0
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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)
......
......@@ -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 @@ class LLAudioEngine_FMODEX : public LLAudioEngine
LLWindGen<MIXBUFFERFORMAT> *mWindGen;
FMOD_DSP_DESCRIPTION mWindDSPDesc;
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