Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Problems whille registering the Auro 3D Plug-in

0 votes

Dears,

I've been trying to register Auro Headphone on Unreal, I lurked here a bit and attempted to do it on my own but to no avail. Here's what I did and please correct me if I messed up any of the steps.

My current case is the following:
My current build of Wwise is 2016.1.3.5878, I have installed the SDK, My Unreal version is 4.13.1
I copy and pasted the SDK files inside the Wwise UE4 Integration folder, I particularly followed Joe Hudson guide on how to do it: https://www.youtube.com/watch?v=BsDWO3Y1318 , I created a small Wwise project with an event that has the auro effect on it.

1 - I made the ThirdParty folder thing {sources, includes, etc..}
2 - I made a new Unreal 4 Project in C++ mode.
3 - I installed and setup Visual Studio 2016.
4 - I configured the "AkAudioDevice.cpp" and added the following lines of code in their respective destination (it says //Add additional plug-ins here. @ Line 62):
#include <AK/Plugin/AkConvolutionReverbFXFactory.h>
#include <AK/Plugin/AkRecorderFXFactory.h>
#include <AK/Plugin/AuroHeadphoneFXFactory.h>
#include <AK/Plugin/AuroPannerMixerFactory.h>

5 - Then I proceeded to add the following lines of code in "AkAudio.Build.cs" at line 262, that line has the statement "AddWwiseLib(Target, "AkRecorderFX");":
AddWwiseLib(Target, "AuroHeadphoneFX");
AddWwiseLib(Target, "AuroPannerMixer");
AddWwiseLib(Target, "AuroHeadphoneFXFactory");
AddWwiseLib(Target, "AuroPannerMixerFactory");

6 - Then I cleaned the solution from Visual Studio and Rebuilt the project to make sure that the damn thing compiles and takes my lines of code.

7 - After that I built and compiled from within Unreal.
8 - Then I double checked that Wwise is enabled in the plugins and made sure that it's enabled.

9 - I then generated sound banks from Wwise and generated sound banks in UE4
10 - I used the Wwise picker to add the event from the sound bank.

11 - I play the event.
12 - No effect added to it in Unreal.
13 - I use the Wwise profiler.
14 - I recieve the error that the Auro plug-in is not registered.
15 - I double check the event in Wwise... the effect works.
16 - I reconnect from Wwise into Unreal to capture the events again (the profiler).. still says that Auro is not registered.

Any idea?

asked Nov 9, 2016 in General Discussion by Ahmad H. (100 points)
(I can't seem to reply below so I'm commenting here.)

There's this answer in the FAQ that gives some insight:


"Q: When I try to use a plug-in in Unreal Engine 4, I get the following error: LogAkAudio:Error: Plug-in not registered: 4163. How do I use plug-ins?"
"A: You need to register your plug-in with the SoundEngine. Add your plug-in registration code in the FAkAudioDevice::EnsureInitialized() method, right after the call to AK::SoundEngine::RegisterAllBuiltInPlugins(). You should also make sure that you link against the plug-in's library. To do so, add a call to the AddWwiseLib function for your plug-in in <UE4_ROOT>/Engine/Source/ThirdParty/Audiokinetic/Audiokinetic.Build.cs, near the other plug-ins."

I assume this applies to the Auro Heaphone plugin but I don't know *what* the registration call is for the plug-in.

I feel like you've set up the libraries and the #includes for your plugin correctly. (although the AuroHeadphoneFX.lib and AuroPannerMixer.lib) need to end up in the ThirdParty WWise Plugin folder as well).

I'm guessing there's a "AK::SoundEngine::Register" call for the Auro Headphone Plugin.

Thoughts? Opinions?

1 Answer

+1 vote

Something tells me you did not recompile the Wwise integration. In step 5, you say you added the following lines to AkAudio.Build.cs:

AddWwiseLib(Target, "AuroHeadphoneFXFactory");
AddWwiseLib(Target, "AuroPannerMixerFactory");

But those libraries don't exist. The Auro libraries are named AuroHeadphoneFX, and AuroPannerMixer. Having those two lines should make your build fail. You should ONLY add the following two lines to AkAudio.Build.cs:

AddWwiseLib(Target, "AuroHeadphoneFX");
AddWwiseLib(Target, "AuroPannerMixer");

Once this is done, close Visual Studio and Unreal Engine. Right-click on your .uproject file and select "Generate Visual Studio project files". Once this is done, open the solution in Visual Studio, and make sure you build for the "Development Editor, Win64" configuration. Once compilation is done, open Unreal Editor and preview your scene. No errors should be reported.

answered Nov 10, 2016 by Benoit S. (Audiokinetic) (16,020 points)
Hello Benoit, I followed your instructions and unfortunately didn't get AuroHeadphone to register. I've tried multiple ways and came up with some insignificant results.

This chunk of code:
private void AddWwiseLib(TargetInfo Target, string in_libName)
    {
        Console.WriteLine("I just parsed: "+in_libName);

        if (Target.Platform == UnrealTargetPlatform.PS4 || Target.Platform == UnrealTargetPlatform.Android || Target.Platform == UnrealTargetPlatform.Linux || Target.Platform == UnrealTargetPlatform.IOS)
        {
            PublicAdditionalLibraries.Add( in_libName );
        }
        else if (Target.Platform == UnrealTargetPlatform.Mac)
        {
            PublicAdditionalLibraries.Add( Path.Combine(akLibPath, "lib" + in_libName + ".a") );
        }
        else
        {
            PublicAdditionalLibraries.Add( in_libName + ".lib" );
        }
    }

is what is running when we add AuroHeadphoneFX, if you deliberately mess with any of the arguements, e.g:

AddWwiseLib(Target, "AuroHeadphoneFX");
and changing it into:
AddWwiseLib(Target, "AuroHeadphoneFXLOLOLOL");

Upon building, cleaning, rebuilding or running the solution, VS still runs the build and doesn't complain that the lib is incorrect.

Other wise, I'm stumped on making it work. Could it be a bug in the new build of Wwise?

Thanks,
I just tried it again. Simply changing the AkAudio.Build.cs and rebuilding is not enough. Here's what you need to do:
1- Modify AkAudio.Build.cs
2- Close Visual Studio and Unreal Editor.
3- In an Explorer window, navigate to your Unreal project's directory
4- Right-click on the .uproject file, and select "Generate Visual Studio project files"
5- Once it's done, open Visual Studio
6- Rebuild your game

The crucial step you seem to be missing is step 4. In Unreal, the *.build.cs files are not compiled when you build your game. They actually are used to generate the Visual Studio solution and projects. When you add a Public Additional Library, Unreal needs to rebuild the project files for the changes to take effect.
I've just uploaded a video of me doing your instructions with some information, the video link is here https://www.youtube.com/watch?v=M_mGbWzoCuk

Thank you
In your project folder, I see no "Plugins" folder. Did you install the Wwise Plugin in your game, or in the Engine? If you installed the Wwise Plugin in your UE4 installation (so in c:\Program Files\Epic Games....), you need to rebuild the engine itself. UE does not rebuild the Engine files when you rebuild your game.

You can either:
* Install the Wwise plugin in your game
* Recompile the engine
I got it to work by copying the Wwise folder from "C:\Program Files (x86)\Epic Games\4.13\Engine\Plugins" into a new folder called "Plugins" that I created in my Unreal Project and then REBUILDING the project in VISUAL STUDIO 2016.

Thank you very much, Benoit S. You've been of tremendous help!

As a closing, what would you recommend if I were using a perforce server? Recompiling the engine or doing a 2.13GB commit on my perforce server?
...