Wwise SDK 2024.1.3
|
#include <IAkPluginTempAlloc.h>
Public Member Functions | |
virtual IAkPluginMemAlloc * | GetTempAllocAudioRenderCurrent ()=0 |
virtual IAkPluginMemAlloc * | GetTempAllocAudioRenderDouble ()=0 |
virtual IAkPluginMemAlloc * | GetBookmarkAlloc ()=0 |
Protected Member Functions | |
virtual | ~IAkPluginServiceTempAlloc () |
![]() | |
virtual | ~IAkPluginService () |
Friends | |
struct | PluginBookmarkAllocRegion |
Interface for performing extremely-fast zero-fragmentation temporary allocations, e.g. allocations that exist for one or two ticks, or allocations that exist for a single stack frame. These use the existing TempAlloc infrastructure in the core soundengine, whose behaviour and allocation characteristics are defined in the MemoryMgr initialization settings.
For temporary allocations, types and lifetimes can be specified for mallocations – or reallocs. These allocations will only persist for the given soundengine tick (Lifetime_CurrentTick) and be destroyed at the beginning of the next tick, or will persist for two soundengine ticks.
For bookmark allocations, you need to mark the start of a bookmark-allocation Region and perform allocations that persist until the bookmark-allocation region is closed. A struct, "PluginBookmarkAllocRegion" has been provided to help with that.
Because these allocations are guaranteed to be destroyed collectively and simultaneously as a part of their respective system, there is no fragmentation incurred by this, and no 'free' function is available. Also, these allocations are also extremely fast, with no multi-threading contention in most cases, and the total overhead of each alloc measured on the order of dozens of cycles.
Definition at line 59 of file IAkPluginTempAlloc.h.
Questions? Problems? Need more info? Contact us, and we can help!
Visit our Support pageRegister your project and we'll help you get started with no strings attached!
Get started with Wwise