버전

menu_open
Wwise SDK 2024.1.0

◆ LoadBankMemoryView() [3/4]

AKSOUNDENGINE_API AKRESULT AK::SoundEngine::LoadBankMemoryView ( const void *  in_pInMemoryBankPtr,
AkUInt32  in_uInMemoryBankSize,
AkBankID out_bankID 
)

Loads a bank synchronously (from in-memory data, in-place, user bank only).
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 LoadBankMemoryView 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.

반환값
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)
Remarks
  • The initialization bank (Init.bnk) 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 memory must be aligned on platform-specific AK_BANK_PLATFORM_DATA_ALIGNMENT bytes (see AkTypes.h).
  • Avoid using this function for banks containing a lot of events or structure data: this data will be unpacked into the sound engine heap, making the supplied bank memory redundant. For event/structure-only banks, prefer LoadBankMemoryCopy().
참고
매개변수
in_pInMemoryBankPtrPointer to the in-memory bank to load (pointer is stored in sound engine, memory must remain valid)
in_uInMemoryBankSizeSize of the in-memory bank to load
out_bankIDReturned bank ID

이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요