Version
menu_open

Using Caution with Crossfade Transitions

The following listed points provide some additional information that you should be aware of before using the crossfade transition within a Random or Sequence Container.

  • Audio File Length

    • Audio file length must be greater than or equal to 0.2 seconds.

    • The minimum crossfade time is 0.1 seconds.

  • Crossfade Time in Relation to Audio File Length

    • When cross-fading from Sound A to Sound B, the maximum crossfade time allowed by the sound engine is half the length of audio file A. In cases where the crossfade time is longer than the maximum allowed, the crossfade time will automatically be adjusted to half the length of the out-going audio file.

      [Note]Note

      Wwise does not limit or indicate that the crossfade is too long for one or more audio files in the container. If an adjustment to the crossfade time is required, it will be done by the sound engine at runtime.

  • Pause and Crossfades

    • If you pause sounds that are using crossfade transitions and also apply a fade-out to the pause application, the timing of the crossfade may be inaccurate.

  • Pitch and Crossfades

    • If you use an RTPC to set the pitch value for a container or a Set Pitch Event Action is triggered while a container is playing, you may experience unexpected results when the crossfade is applied between sounds.

  • Source Plug-ins and Crossfades

    • If you apply a crossfade to a source plug-in, the crossfade may be ignored if the end of the source cannot be determined. This can happen, for example, when the duration of a sine generated source is based on an RTPC. In these types of cases, the crossfade is ignored and the transition is done without the crossfade.

  • Switch Containers and Crossfades

    • When a Switch Container is a child of a Sequence Container, crossfade transitions will be applied differently depending on the number of Wwise objects assigned to a Switch.

  • Two Voices

    • Two different voices are used by the sound engine during a crossfade.

  • Virtual Voices and Crossfades

    • By definition, Play from Beginning and Resume virtual voice behaviors have an effect on sound duration when it goes under the Volume Threshold or over the Playback Limit, which is not taken into account by the crossfade timing mechanism.

    • Voices may become virtual when their volume goes under the threshold. For any given sound, the volume that is compared against the threshold is the real effective volume of all its audio channels. This includes resulting from the contribution of all volumes of the Actor-Mixer Hierarchy, Fade transitions, Interactive-music transitions, RTPCs, States, positioning, and attenuations.

    • The contribution of fade transitions also counts when computing the effective volume of a sound. Consequently, during a crossfade transition inside a Random, Sequence, or Blend Container, fading sounds will likely go below the volume threshold for some time. If their behavior under threshold is Play from Beginning or Resume, their real duration will be longer than expected by the container's logic. This will result in unpredictable behavior. Worse, when a sound fades out under threshold, it stops "virtually" playing, and therefore never ends. The container could, consequently, stop sequencing more sounds.

    In sum, you should avoid using these types of virtual voices with containers that use crossfade transitions. If you wish to use virtual voices with these containers, you should select the Play from elapsed time behavior.


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