Version
menu_open

Priority Tips and Best Practices

Before defining the advanced settings for your objects, you may want to review the following sections, which provide you with a series of tips and best practices that can help you get the results you want.

Playback Priority

Set music objects to higher priority - in most cases, the music objects in your game should have a higher priority than other sound or motion objects. This will ensure that your music plays back continuously in situations when many objects are triggered and the playback limit is surpassed.

Volume Threshold

Kill short sound FX when they fall below volume threshold - in most situations, you should use the Kill voice option for short sound FX that fall below the volume threshold because sending them to the virtual voice list will do either of the following:

  • If Restart from beginning or Resume is selected, the sound will most likely be played outside its original context.

  • If Play from elapsed time is selected, CPU will be used uselessly for a sound that will likely die as a virtual voice.

Virtual Voices

Before deciding which virtual voice option to use, you should be aware of the virtual voice settings' memory and CPU usage:

  • Restart from beginning - This option uses a small amount of memory and CPU, but if the sound is streamed, there may be a delay when it returns from the virtual voice.

  • Resume - This option uses a smaller amount of CPU but a larger amount of memory because it keeps the memory buffers on hold for when the sound returns from the virtual voice. Be aware that if a sound never returns from the virtual voice because it never re-enters the radius, the memory buffers will remain in memory for the length of the game. If this occurs for many sounds, the memory buffers will accumulate over time and may end up taking a significant amount of memory in the game.

  • Play from elapsed time - This option can save some CPU and memory, but if the sound is streamed, there may be a delay when it returns from the virtual voice.

The following illustration displays the memory and CPU usage for each of the virtual voice options in relation to each other and to the Continue to Play option:

Of course, when you take into account a sound's audio format, sample rate, streaming settings, and so on, the differences between these options can go from negligible to very large.

Virtual voices: What's calculated and what's not

Always Calculated

Not Calculated When Virtual

  • Positioning, calculations, voice priority, and volumes are still computed because they are required to determine if the voice should return physically or not.

  • In from elapsed time mode, source plug-ins are still computed when virtual (because the sound engine cannot seek in a source plug-in).

  • Codec decompression.

  • Audio data moving, copying, or mixing.

  • LPF, sample-rate conversion, pitch shifting, and effects inserted in the Actor-Mixer Hierarchy.

  • I/O reads.

[Note] Note

Most of the time, buffers of audio data are freed when the voice becomes virtual, except for the Resume behavior.

[Note] Note

Effects on busses of the Master-Mixer Hierarchy are processed only when there is at least one physical voice playing through this bus.

Playback Limits on the Wii

The maximum number of voices on the Wii is determined by the hardware and will vary depending on the Audio DSP usage. Voices that cannot play due to hardware limitations will use the volume threshold settings of the related sound to determine what will happen to them. This means that some voices on the Wii may be sent to the virtual voice list even if their volume does not fall below the threshold level.

For example, let's say the maximum number of hardware voices is 96 and at a particular point in the game 100 voices have been triggered to play. In this case, the 4 voices with the lowest priority will do one of the following based on each corresponding sound's volume threshold setting:

  • If set to “Continue to play”, the voice will be sent to the virtual voice list.

  • If set to “Kill voice”, the voice will be killed.

  • If set to “Send to virtual voice”, the voice is sent to the virtual voice list.

When a voice is sent to the virtual voice list on the Wii, its volume gets computed twice less often to check if the volume must return from the virtual state. Although this saves a significant amount of CPU for voices that are not loud enough to be heard, virtual voices on the Wii may be delayed by a few milliseconds when returning from the virtual voice.

[Note] Note

Stereo voices take two hardware voices each. If a stereo voice gets one of its two voices killed or sent to the virtual voice list because too many voices are playing, both voices of a stereo sound will follow the same behavior to ensure that they have consistent positioning.

Using Instance Limiting with Music Objects

When using instance limiting with music objects, be careful not to set the limit too low because it may prevent certain clips from playing causing breaks or cuts in your music. Remember that when fading and switching between music segments, you can easily use up several instances, with the different pre-entry and post-exit parts of one or more clips within each segment, as well as any stinger segments that might be playing.


Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise