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.

New error in inherited codebase "File not found: init.bnk"

0 votes

Hi, We have a 2021.1.13 integration with Unity 2022.3.f10.
Our game was working properly as far as we knew but our sound team recently made us aware of an error on initialization:
File not found: init.bnk

Our sound layer is very old but here's our best understanding of what's going on (example below is for Android but this happens with iOS as well)
Our init.bnk file is in a PCK file called Initial.pck. It sits in our project at this location
Assets/StreamingAssets/Audio/GeneratedSoundBanks/Android/Initial.pck
Our Base Path setting is "Audio/GeneratedSoundBanks"

When we launch our game, we do the following in order:
call AkCallbackManager.SetMonitoringCallback
enable a gameobject that contains an AkInitializer instance.
In turn it calls AkWwiseInitializationSettings.InitializeSoundEngine(), which calls

var result = AkSoundEngine.LoadBank("Init.bnk", out BankID);

inside AkBankManager.LoadInitBank().
I believe this is the call that's failing, but I want to confirm some things

Do we have to manually call LoadFilePackage on PCKs inside or StreamingAssets folder?
If not, why would AkSoundEngine.LoadBank() be failing?
If so, when should LoadFilePackage be called? I tried calling it before our AkInitializer is instantiated and it just made wwise crash:
=================================================================
    Managed Stacktrace:
=================================================================
      at <unknown> <0xffffffff>
      at AkSoundEnginePINVOKE:CSharp_LoadFilePackage <0x00007>
      at AkSoundEngine:LoadFilePackage <0x0006b>
      at <DelayedOTAAudioInit>d__229:MoveNext <0x00cf3>
      at UnityEngine.SetupCoroutine:InvokeMoveNext <0x0012b>
      at <Module>:runtime_invoke_void_object_intptr <0x000d7>
=================================================================
Obtained 54 stack frames.
#0  0x000003bf5a9424 in CAkFilePackageLowLevelIO<CAkDefaultIOHookBlocking, CAkDiskPackage>::LoadFilePackage(char const*, unsigned int&)
#1  0x000003bf5a93a0 in LoadFilePackage(wchar_t const*, unsigned int&)
#2  0x000003bf5bd440 in CSharp_LoadFilePackage
#3  0x000003a5545af4 in  (wrapper managed-to-native) AkSoundEnginePINVOKE:CSharp_LoadFilePackage (string,uint&) [{0x347fc37c0} + 0xcc]  (0x3a5545a28 0x3a5545b98) [0x139582a80 - Unity Child Domain]
#4  0x000003a5545764 in  AkSoundEngine:LoadFilePackage (string,uint&) [{0x304ed5d18} + 0x6c] [/Users/jeffery.chow/Perforce/m3_jchow_mbp2023/lax-m3/trunk/Unity/Assets/Wwise/API/Runtime/Generated/Mac/AkSoundEngine_Mac.cs :: 945u] (0x3a55456f8 0x3a55457a0) [0x139582a80 - Unity Child Domain]

Can someone verify for me if this is a nonstandard place to put our init.bnk? I don't want to modify any of the ak initialization code because it's self contained and I don't want to deal with any headaches if a new version drops and I need to resolve a bunch of conflicts.

Thanks in advance,
Jeff

asked Feb 27 in General Discussion by J C. (100 points)

Please sign-in or register to answer this question.

...