Wwise SDK 2019.1.11
|
Wwise 사운드 엔진의 모든 모듈은 AK::MemoryMgr 인터페이스를 통해 메모리에 접근합니다. 사운드 엔진의 클라이언트는 이 인터페이스의 초기화와 종료 처리를 해야 합니다.
SDK에 정적 라이브러리(AkMemoryMgr.lib)로 기본 구현이 제공돼있습니다. To use this library, the client needs to define a number of functions: AK::AllocHook(), AK::FreeHook() and platform-specific variants. AK::AllocHook() and AK::FreeHook() can simply be redirected to the standard malloc and free functions, while the other allocators must go through specific OS calls as documented in AkMemoryMgr.h. The AK::MemoryMgr::Init() factory function is exposed in AkModule.h.
AkMemoryMgr.lib 와 다른 라이브러리의 사용법에 더 자세한 정보는 빌드 환경 설정 를 참고하세요.
When initializing the memory manager, it is important to specify a maximum number of pools that are required to accommodate all modules during the lifetime of the memory manager. Depending on the build configuration and the presence of various modules, approximately 14 pools are created at initialization time. Further, an extra pool is created for every loaded bank (if no existing pool is specified when calling AK::SoundEngine::LoadBank()).
자신의 게임에서 Memory Manager의 초기화에 대한 더 자세한 정보와 예제 코드를 보려면 예제 를 참고하세요.
SoundBank 메모리 사용에 대한 더 자세한 정보는 뱅크 로딩 을 참고하세요.
Memory pools can be created and destroyed during the entire lifetime of the memory manager. 이 풀은 동일한 크기의 블록으로 세그먼트화되어 가장 작은 할당 단위를 표시합니다. A pool, once created, cannot be resized with the default implementation of the memory manager. Refer to 메모리 매니저 오버라이딩 for information regarding the implementation of a custom memory manager.
참고: Banks containing XMA files on the Xbox One need to be loaded in pools created with the AkPhysicalAlloc type. |
참고: In the default implementation, each pool that is created uses 7.2 KBytes for internal pool management. When creating a pool with the pool size equal to the block size, no memory overhead will be reserved. It is important to use pools even for a single block of memory so that all memory statistics are visible in the Wwise profiler. Refer to 메모리 풀 최적화 for information about choosing the best sizes for pools. |
It is possible for a client to implement the AK::MemoryMgr interface. Here are a few things to watch for when doing so.
AK::MemoryMgr::CreatePool() must respect the allocation type parameter.
A client could choose to make the maximum number of pools dynamic, and the individual pools resizable. This offers more flexibility to the sound engine at the expense of predictability.
Refer to the AK::MemoryMgr namespace for a detailed description of the methods you need to implement when overriding the default Memory Manager.
프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.
Wwise를 시작해 보세요