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.

+1 vote
I try to reload Init.bank, But It failed. Can the Init Bank be reload?

(1) After using `AK::SoundEngine::ClearBanks()` clear all bank, I try to load init.bnk (verson 2) and the result is error_code(ErrorCode_CannotOpenFile).

(2) I try to unload init.bnk(verson 1), and load the same init.bnk(verson 1). It works fine.

(3) I try to load init.bnk (verson 2) at first, and unload bank. Then I try to load init.bnk(verson 1), But It failed.

(4) Finally After I try to unload all banks and  use `AK::SoundEngine::Term()` and `AK::SoundEngine::Init` to restart audio engine, I can load  init.bnk (verson 2).

Can the Init Bank be reload?
in General Discussion by Sambeau W. (140 points)

1 Answer

–1 vote
The Init.bnk can be reloaded without terminating and re-initializing the Sound Engine instance if you first unload the other banks. For example, the Wwise Unreal integration successfully does it.

Prior to loading a new Init.bnk, a full clear of all SoundBanks loaded prior is required (using AK::SoundEngine::ClearBanks() is correct), but you also need to make sure all sounds have been stopped, including dynamic voice systems. You will probably need to wait until all effect tails are done playing too: adding a sleep can help with that, otherwise tracking events with the EndOfEvent callback is required to make sure everything is ready to be reloaded. Note that processing will need at least one frame to process the stop requests.
Finally, game objects that were registered need to be unregistered and re-registered after.

If you think you have found a bug, you can report it through the Bug Report (https://www.audiokinetic.com/library/edge/?source=InstallGuide&id=reporting_bugs).
by Samuel L. (Audiokinetic) (23.6k points)
edited by Samuel L. (Audiokinetic)
The Init.bnk can not be reloaded, After I try follewed works. There is no things in advaced profile view of wwise editor(2021.1.7).
(1) use `AK::SoundEngine::StopAll()` to close all sound.
(2)  `AK::SoundEngine::ClearBanks()`  to unload all sound.
(3) `AK::SoundEngine::UnregisterGameObj` unregisger all object.
(4) `AK::SoundEngine::UnregisterGlobalCallback`
(5) `AK::SoundEngine::SetDefaultListeners(nullptr, 0)`
(6) `AK::SoundEngine::StopAll();`
(7) `FPlatformProcess::Sleep(1.0f);`
Nope, that's incorrect.

"The following packages are in-memory only and cannot be reloaded:
    /Game/WwiseAudio/InitBank"
...