Load a bank synchronously (from in-memory data, in-place).
IMPORTANT: Banks loaded from memory with in-place data MUST be unloaded using the UnloadBank function providing the same memory pointer. Make sure you are using the correct UnloadBank(...) overload
Use this overload 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. In-memory loading is in-place: *** the memory must be valid until the bank is unloaded. *** 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_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_InvalidParameter: Invalid parameter, invalid memory alignment.
- 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 stored in sound engine, memory must remain valid) |
|
in_uInMemoryBankSize |
Size of the in-memory bank to load |
|
out_bankID |
Returned bank ID |