Wwise SDK 2023.1.5

◆ LoadBank() [1/4]

AKSOUNDENGINE_API AKRESULT AK::SoundEngine::LoadBank ( AkBankID  in_bankID,
AkBankCallbackFunc  in_pfnBankCallback,
void *  in_pCookie,
AkBankType  in_bankType = AkBankType_User 

Loads a bank asynchronously (by ID).

Note: Requires that the "Use SoundBank names" option be unchecked in the Wwise Project Settings.

The bank ID is passed to the Stream Manager. Refer to General Information for a discussion on using strings and IDs. A bank load request will be posted to the Bank Manager consumer thread. The function returns immediately.

  • AK_Success if the scheduling was successful,
  • AK_InvalidBankType if in_bankType was invalid Use a callback to be notified when completed, and get the status of the request. The bank ID, which is obtained by hashing the bank name (see GetIDFromString()). You may use this ID with UnloadBank().
  • The initialization bank must be loaded first.
  • All SoundBanks subsequently loaded must come from the same Wwise project as the initialization bank. If you need to load SoundBanks from a different project, you must first unload ALL banks, including the initialization bank, then load the initialization bank from the other project, and finally load banks from that project.
  • Codecs and plug-ins must be registered before loading banks that use them.
  • Loading a bank referencing an unregistered plug-in or codec will result in a load bank success, but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects, posting the event will fail.
  • The file path should be resolved in your implementation of the Stream Manager, or in the Low-Level I/O module if you use the default Stream Manager's implementation. The ID overload of AK::IAkStreamMgr::CreateStd() and AK::StreamMgr::IAkLowLevelIOHook::BatchOpen() are called.
  • The cookie (in_pCookie) is passed to the Low-Level I/O module for your convenience, in AK::StreamMgr::IAkLowLevelIOHook::BatchOpen()
See also
in_bankIDBank ID of the bank to load
in_pfnBankCallbackCallback function
in_pCookieCallback cookie (reserved to user, passed to the callback function, and also to AK::StreamMgr::IAkLowLevelIOHook::BatchOpen() as AkFileSystemFlags::pCustomParam)
in_bankTypeType of the bank to load

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise