Lesson 7

Table of Contents

Monitoring Memory Usage

The previous section described how to inspect Wwise memory usage with the Profiler. Although you can partly inspect memory usage in other tabs in the Advance Profiler, such as the SoundBanks tab, the Memory tab provides a more holistic view of all allocated memory divided into different categories. You’re probably already familiar with some of the categories, such as Media, Structure, or Events, but SoundBanks are not the only parts of Wwise that use memory.

For the purposes of this certification course, the following categories are the most relevant:

  • Media: Compressed and uncompressed media loaded by SoundBanks.

  • Processing: Audio buffers for decompression, applying effects, mixing, and DSP.

  • Processing (Plug-in): Allocations for plugins such as Convolution Reverb, RoomVerb, or Time Stretch.

  • Integration: Integration-specific allocations, such as callbacks or capturing audio output.

For the entire list of descriptions, see Memory.

As you can see from the number of memory categories, many different aspects of the sound engine use memory. Some, such as Media, seem quite static until a significant jump in memory usage occurs because they are based on loading SoundBanks, whereas others, like Processing or Spatial Audio, constantly change because they depend on runtime conditions, like the number of voices that are currently playing. Therefore, the Memory tab is best used for general awareness of memory usage, such as assessing which part of the sound engine has the highest memory demand. Based on your assessment, you can then optimize with techniques you learned in previous lessons.

To demonstrate how the memory usage changes based on the game scenario, let's open a scene in WAG that has been adapted for Spatial Audio Acoustics: the dungeon.

[Note]

Spatial Audio Acoustics refers to a method of configuring rooms, portals, and much more to control sound propagation through the space in your game. You do not have to fully understand it in this course but for more information, see Spatial Audio in Unity.

This technology is only enabled in a single part of WAG, so after you teleport to it, you’ll see a noticeable change in the Memory tab.

  1. Play WAG and reconnect the Profiler.

  2. In the Advanced Profiler, make sure the Memory tab is open and pay attention to the memory used in the Spatial Audio category.

  3. Open the Menu (Esc), navigate to the Audio sub-menu, and enable Spatial Audio.

  4. Go back to the Main menu and teleport to the Dungeon.

  5. Return to the Advanced Profiler's Memory tab and inspect the Spatial Audio category again.

  6. Exit play mode. Notice that as you entered the dungeon, there was an increase in memory usage in the Spatial Audio category. Because this is a normal part of the game, there's no need to optimize anything further. However, if you had seen an unexpected increase in Media or Processing (Plug-in) memory usage, you could use this assessment as a starting point to diagnose memory issues: you might have loaded a SoundBank twice, for example, or might need to review your Effect settings.


Was this page helpful?