CRI ADX  Last Updated: 2025-05-07 13:34 p
Fader
"Fader" is a module that automatically performs various volume controls to the sounds played on a player, such as fade-in, fade-out, and cross-fade.
Attention
The behavior of an AtomEx player with a fader attached is significantly different from that of a normal AtomEx player.
(The behavior of the AtomEx player changes significantly before and after attaching a fader.)
Specifically, the number of sounds that can be played simultaneously is limited to one sound (two sounds only during crossfading), and control using the playback ID ( CriAtomExPlaybackId ) is no longer possible.

In addition to faders, the Atom library also has functions such as envelopes and Tweens as a means of implementing fade-ins and fade-outs.
If you want to perform simple fade-in/out operations or control using a playback ID, consider using other functions instead of faders, which have many functional limitations.
(Faders are useful when you need to crossfade two sounds with strict timing, but functional limitations may be a hindrance when using them for simple fade-in/out purposes.)

Overview of fader's operations

Fader is a plug-in module to the AtomEx player.
When executing the criAtomExPlayer_Start function to the fader-attached AtomEx player, the fader performs the following controls to the sounds being played on the Atom Explayer:

  1. If a sound being faded-out already exists, the fader stops the sound immediately.
  2. If a sound being faded-in (or a sound being played) exists, the fader makes the sound fade-out by changing the volume from the current value to zero in the specified time by the criAtomExPlayer_SetFadeOutTime function.
  3. When starting a playback of the sound set to the player at the volume zero, the fader makes the sound fade-in in the specified time by the criAtomExPlayer_SetFadeInTime function.
Note:
  • In the case of using the criAtomExPlayer_Prepare function instead of the criAtomExPlayer_Start function, the above control is performed when releasing the pause.
  • In the case of executing the criAtomExPlayer_Stop function, only the process that fades-out the playing sounds is performed.
    (#1 and #2 in the above description are performed.)
Attention
Due to the restrictions on the fader specifications, only the last two playbacks become the target of the fade-in/fade-out process.
The sound that was played back before them is immediately stopped when the criAtomExPlayer_Start or the criAtomExPlayer_Stop function is executed.

Parameters that can be set

The following parameters can be set to the fader:

Parameters that can be set to the fader
Parameter Description
Fade-in time Specify the time from the start of the volume increment to its end.
Fade-out time Specify the time from the start of the volume decrement to its end.
Fade-in start offset For cross-fading, specify the time offset from the start of the fade-out to the start of the fade-in.
When specifying the negative value, the fade-in process starts before the fade-out process.
Fade-out end delay Specify the time from the end of the volume decrement to the playback stop.
In the case where a latency from when specifying volume and till when it is acutually reflected may be caused due to the specifications of sound driver or hardware, this parameter is valid.
Next:Tween