Wwise SDK 2024.1.0
|
The Wwise sound engine memory allocations can be divided into two broad groups: a number of fixed-size allocations made upon sound engine initialization, and dynamic allocations.
Some of the fixed-size allocations can be controlled via initialization parameters. Here is a list of init-time memory allocation controls:
Of these, uIOMemorySize is the most significant. This streaming buffer size should be set based on the maximum number of concurrently played streamed sounds, the bitrate of the sounds, and the safety timeline of the streaming sounds. The default value of 8 MB may be seen as a waste of memory for some games, but it is best to start out large and trim down as your memory usage becomes clearer. For more information on streaming buffer memory, refer to Audiokinetic Stream Manager Initialization Settings.
See the documentation for memory allocation categories in AkMemID to get a better understanding of the various types of allocations made by the sound engine. Statistics for each of these categories are reported in the Memory tab of the Wwise Advanced Profiler View.
Debug-only allocations are made in the Monitor Queue and Profiler categories, which are not used in the Release version. Subtracting the size of these categories should give you a good idea of the release-version memory usage.
Note: You can also explore sound engine memory usage in the Memory tab by capturing profile information from Wwise itself without connecting to a game. |
Total memory allocation by the sound engine can be controlled via the AkMemoryArenaSettings::uMemReservedLimit initialization parameter for each arena. With a limit set, the sound engine reacts differently to out-of-memory conditions depending on when the condition occurs. For example, here is what happens when memory is missing in the following scenarios:
When you use the Wwise Profiler, a warning notification is sent to the capture log for every allocation failure that occurs in the game. You can check this list of notifications to find out which memory categories were involved in reaching the memory limit during gameplay.
The following items can cause high memory usage:
Warning: When performing tests to check peak memory usage, you must ensure that the current speaker setup configuration used by the game is set to its maximum configuration (for example, 7.1 on PC when using the system audio output device). This is necessary because the sound engine performs some optimizations when the speaker setup is stereo, and therefore will use less memory than in multi-channel configurations. |
More details are available in the following sections:
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