Table of Contents

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 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 SFX when they fall below Volume Threshold - in most situations, you should use the Kill voice option for short sound SFX that fall below the volume threshold because sending them to the virtual voice list will do either of the following:

  • If Play 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:

  • Play 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.

  • 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.

  • 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.

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.

Table 12.1. 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 Play 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.

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.