How to add and register wwise plugin

I have a .lib and .h where I think they are supposed to be in the wwise folder structure (we don’t use LTX, we use the full version), I have the .h included in WWISESDK\include\AK\Plugin\AllPluginsFactories.h and I added the name of the .lib in …\Tools\build\waf-1.7.13\lmbrwaflib\wwise.py in the libs section. But when I lmbr_waf configure I had expected the various cache.py files in binTemp to be updated with the new wwise lib name but they aren’t. And so the game doesn’t link with the new wwise plugin’s lib and I get an unresolved external symbol error.

Are there certain steps I need to take?

Hi @rjlwest

I believe that wwise.py file is old and should not be used anymore by the build system. I believe in Lumberyard 1.15 it has been removed.

To add your library, you can edit \dev_WAF_\3rdParty\wwise.json instead.

As for the plugin header, you might want to avoid adding it to AllPluginsFactories.h and just include it somewhere in Lumberyard source, I usually edit AudioSystemImpl_wwise.cpp and add plugin includes to that file.

Hope this helps! Let me know how it goes.

If there’s a name conflict you may want to change the name of your plugin’s function. The ‘SetAudioInputCallbacks’ function is part of the SDK associated with Audio Input Source plugin, and we also make use of that in Lumberyard. I assume you’re basing your plugin off the Audio Input Source plugin, could you rename your callback registration function? You shouldn’t need to disable one to get the other working.

I did that, added the name of my new lib to ‘ak_source_libs’ and now I get the following build error SeverityCodeDescriptionProjectFileLineSuppression State ErrorLNK2005"void __cdecl SetAudioInputCallbacks(void (__cdecl*)(unsigned long,class AkAudioBuffer ),void (__cdecl)(unsigned long,struct AkAudioFormat &),float (__cdecl*)(unsigned long))" (?SetAudioInputCallbacks@@YAXP6AXKPEAVAkAudioBuffer@@@ZP6AXKAEAUAkAudioFormat@@@ZP6AMK@Z@Z) already defined in AkAudioInputSource.lib(AkFXSrcAudioInput.obj)_WAF_j:\Main\Solutions\LumberyardSDK_vs15.depproj\AkAudioInputSource.lib(AkFXSrcAudioInput.obj)1

I think I figured it out, the new plugin and AkAudioInputSource must be sharing the same static function name. I disabled AkAudioInputSource and the new plugin links fine.