Loads a bank synchronously (from in-memory data, out-of-place, user bank only).
NOTE: Banks loaded from in-memory with out-of-place data must be unloaded using the standard UnloadBank function (with no memory pointer). Make sure you are using the correct UnloadBank(...) overload
Use LoadBankMemoryCopy when you want to manage I/O on your side. Load the bank file in a buffer and pass its address to the sound engine, the media section of the bank will be copied into newly allocated memory.
In-memory loading is out-of-place: the buffer can be release as soon as the function returns. The advantage of using this over the in-place version is that there is no duplication of bank structures. A bank load request will be posted, and consumed by the Bank Manager thread. The function returns when the request has been completely processed.
- Returns
- The bank ID, which is stored in the first few bytes of the bank file. You may use this ID with UnloadBank().
AK_Success:
Load or unload successful.
AK_BankAlreadyLoaded:
This bank is already loaded, nothing done.
AK_InsufficientMemory:
Insufficient memory to store bank data.
AK_BankReadError:
I/O error.
AK_WrongBankVersion:
Invalid bank version: make sure the version of Wwise that you used to generate the SoundBanks matches that of the SDK you are currently using.
AK_InvalidFile:
File specified could not be opened.
AK_NotInitialized
if the sound engine was not correctly initialized
AK_InvalidParameter
if some parameters are invalid, check the debug console
AK_InvalidBankType
if the bank is not a user-defined bank.
AK_DataAlignmentError
if the data pointer is not aligned properly
AK_Fail:
Load or unload failed for any other reason. (Most likely small allocation failure)
- See also
-
- Parameters
-
in_pInMemoryBankPtr | Pointer to the in-memory bank to load (pointer is not stored in sound engine, memory can be released after return) |
in_uInMemoryBankSize | Size of the in-memory bank to load |
out_bankID | Returned bank ID |