Version
This method will apply if:
A high level of granularity is required for media to keep the memory usage low.
You do not want to worry about splitting your media assets into SoundBanks.
You have Events in your project that play different sounds based on Switches or States.
Your project contains interactive music that plays music based on Switches or States.
This method is basically the same as the previous method, but with more control over the media that gets loaded when Events are prepared. With this method, only the media associated with both the Events that are prepared and the game syncs that are currently active is loaded into memory.
Let's say you have a simple project with two Events: "Play_Maincharacter_FootSteps" and "Play_Monster_Footsteps". Each Event plays a different Switch Container that plays different random sounds based on the ground texture under the moving character. The Switch Group name is "GroundTexture" and has three possible states: "Snow", "Concrete", and "Sand".
The Switch Container hierarchies in Wwise will look like the following:
In this example, we have 18 sounds (6 groups of 3 sounds) that can potentially be loaded into memory. You could use Preparing Action Events, but you won't get a level of granularity higher than six sounds loaded in memory per Event.
You could use Micromanaging Media to get a higher level of granularity, but you would have to create six different SounbBanks for this simple project (the number of SoundBanks increases quickly in a real project). Then, when a monster appears, you would have to check to see what textures are possible and then load the appropriate SoundBanks.
With the current method, all you have to do is specify which Events and game syncs are possible and then only the appropriate media is loaded. To make things very simple, all the media can be grouped into one single SoundBank.
To set up SoundBanks when preparing Events and Game Syncs:
Create a SoundBank named "Events" and load it into the SoundBank Editor.
Drag the two Events to the Add tab of the SoundBank Editor.
Disable the Media check box, leaving only the Events and Structures check boxes enabled. When using PrepareEvent(), the media must not reside in a SoundBank, but be loaded directly off disk as a loose file.
![]() | Note |
---|---|
For the purposes of this example, all the Events and structures are contained in one SoundBank. Although this is acceptable for small projects, you will most likely want to split up your content into several SoundBanks. It is also possible to create a separate "Structures" SoundBank that does not need to be explicitly loaded nor prepared from the SDK command because each Event includes references to the other SoundBanks that need to be loaded. |
Generate the SoundBanks and copy the generated SoundBank folder to the game application.
![]() | Note |
---|---|
The structure data contained within a single SoundBank can't be split at run time. Therefore, if you are using AK::SoundEngine::PrepareEvent, and the structure data from a separate SoundBank is required, all the structures within that SoundBank will be loaded at once. For this reason, you might want to split the structure content in your project into multiple SoundBanks, to minimize the amount of unnecessary information that is loaded into memory. |
For integration details, see Preparing Events and Game Syncs (Switches and States) in the Wwise SDK documentation.
The following table lists the pros and cons of preparing game syncs.
Pros |
Cons |
---|---|
Bank generation process is simple. Level of granularity for media is very high. Maintain a low overall memory usage. Easy to automate the process. Only useful media gets loaded. |
Potentially increases the number of reads and seeks on the disk as the media assets are loaded one by one. |
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