Lesson 7

Table of Contents

Processor Optimization

In game play, every time a sound is to be played, a small amount of processing power is required from the game system’s CPU. While audio puts a relatively small load on the processor, consider that the processor must be shared with other aspects of the game, such as 3D graphics rendering, that can put tremendous stress on the system. For this reason, you need to be aware of how to maximize the audio engine’s use of the processor and not waste processing cycles unnecessarily.

Every sound played in game requires something called a voice through which it is played. Do not confuse this with the Voice object mentioned earlier in this lesson that is used with dialogue. In this case, you can think of a voice as the logical mechanism that produces the sound in the game. Every active voice uses processor cycles.

In some games, especially 3D world games like Cube, voice counts can quickly add up. If you have your Wwizard throwing magical gems at 30 monsters who are all throwing gems back simultaneously, these sounds, plus the sound of all of their footsteps and all of the other background ambient sounds, can quickly add up the voice count. The fact is that a lot of those sounds are not important to hear. The monsters walking 100 meters away might have footsteps quietly playing in the distance, but those are not likely to be heard when there are ten other monsters two meters away hurling magic gems. Those distant footsteps require just as much processing power as the nearby magic sounds, so if the footsteps are unlikely to be noticed, it's a waste of processing. To minimize this waste, your project has settings that define a minimum volume that the sound would need to actually render the sound through a voice.

  1. From the Wwise menu bar, choose Project > Project Settings and select the General tab.

    You can see settings can be configured differently depending on the game system that you are developing for. For example, a Nintendo Switch has less processing power than a PlayStation 5, so you adjust these values separately for each game system. The default setting for Volume Threshold is -80, which is a value in decibels. This means that there’s 80 dB of dynamic range in the game. If you wanted to relax the load on a game system’s processor, you could reduce the dynamic range by changing the Volume Threshold to a higher number, but be aware that if you do this, there is a risk that some sound that you want to hear, such as subtle ambience may end up getting cut off.

    There is also another parameter that defines the maximum number of voices that are allowed to play through the system at any one time. This prevents overloading the system altogether. Lowering this parameter ensures that the audio engine will require less processing on the CPU, but again it means that some sounds you want to hear may get cut off, especially in the heat of battle when there’s lots of action going on. Nothing is worse than when the game is at its most intense level, and you lose the sound of your main magic, effectively taking you out of the experience. Don’t worry, you’ll learn how to prioritize voices later in this exercise.

  2. Change the Volume Threshold for your system to -50, and set the Max Voice Instances to 40, and click OK.

    Some sounds by nature can be real voice hogs. In Cube, the Poison Gem is thrown at a rapid rate and the sounds it makes each time it's thrown will start to overlap each other. This can cause the voice count to quickly add up. To help manage this, it’s possible to manage how many voices any one object might take at any one point in the game.

  3. Go back to the Designer layout and, in the Project Explorer, select the Magic Actor-Mixer and, in the Property Editor, click the Advanced Settings tab.

    The Playback Limit group allows you to set the total number of voices that can be used. You can set this so that the limit number applies to each game object, meaning that each character would have 50 voices available for their particular magic, or it can be set globally, meaning that no more than 50 magic sounds of any one type would be heard at the same time. The latter can be quite useful, as it is unlikely that the player would be able to distinguish much more than a few handfuls of sounds of the same type played at the same time.

  4. Select the Limit sound instances to check box, set the instance value to 25, and select Globally from the drop-down menu.

    There are some sounds that you want to make sure never get killed regardless of what is happening in the game. To accommodate this, Wwise has a voice prioritization system where you can rank types of sounds according to how important it is to hear them in the game. This way, when the game system must kill voices, it doesn’t silence the sounds that truly need to be heard.

    A good example of a sound you wouldn’t want to unexpectedly turn off would be things like player dialogue or music. In this case, you’ll protect the music object by giving it a high voice priority number.

  5. Choose the Cube Main Theme object and change its Priority value to 80.

    Now it’s nearly impossible for the music to ever be inadvertently turned off during game play.

    [Tip]

    The Offset priority check box and setting specifies a value by which the priority of an object is offset when it reaches the max distance value specified in the Attenuation Editor. This is helpful for prioritizing objects, such as footsteps, that need priority when they are close to the listener, but are less important when they are far away.

    [Tip]

    Also in the advanced settings is the Virtual Voice group. Virtual Voices represent sounds that would normally play, but they are instead added to the Virtual Voice list because their volumes are lower than the Volume Threshold set for the platform. The Virtual Voice list is a virtual environment where certain parameters of a sound are monitored by the sound engine. Sounds may move from the audible—physical voice to the silent—virtual voice and vice versa based on their volume levels. If the volume returns above the Volume Threshold or the number of playing sounds goes under the limit of simultaneous playing sounds, the objects automatically move back into the physical voice.


Was this page helpful?