menu
 

AudiokineticのコミュニティQ&AはWwiseやStrataのコミュニティ内でユーザ同士が質問・回答をし合うことができるフォーラムです。Audiokineticテクニカルサポートチームからの回答をご希望の場合は、必ず サポートチケットページ をご利用ください。

+1 支持
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?
Sambeau W. (140 ポイント) General Discussion

回答 1

–1 支持
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).
Samuel L. (Audiokinetic) (23.6k ポイント)
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"
...