CRI ADX  Last Updated: 2025-05-07 13:34 p
Playback by Changing Parameters

Samples Directory

/cri/pc/samples/criatomex/playback_param

Data used in the sample

/cri/common/smpdata/criatomex/
  • SampleProject.acf
  • AtomCueSheet.acb
  • AtomCueSheet.awb

Sample description

CRI Atom allows you to change player parameters such as volume, playback pitch, and filter cutoff frequency during audio playback.


Parameters can be changed before or during playback.
Parameters are set for the player using dedicated parameter setting functions, but to actually reflect the changes in the player, you need to execute the criAtomExPlayer_UpdateAll function for the player.
The code to set player parameters and apply a low-pass filter is shown below.
\code
/* Set volume */
/* Set a pitch in cents */
criAtomExPlayer_SetPitch(player, 0.0f);
/* Set cutoff frequency for band pass filter */
/* Set biquad filter parameters */
/* Apply parameters for all Voices used by the player */
@ CRIATOMEX_BIQUAD_FILTER_TYPE_LOWPASS
Definition: cri_le_atom_ex.h:1988
void criAtomExPlayer_SetPitch(CriAtomExPlayerHn player, CriFloat32 pitch)
Set the pitch (detune)
void criAtomExPlayer_SetVolume(CriAtomExPlayerHn player, CriFloat32 volume)
Set the volume.
CriAtomExPlayerObj * CriAtomExPlayerHn
Player handle.
Definition: cri_le_atom_ex.h:3622
void criAtomExPlayer_UpdateAll(CriAtomExPlayerHn player)
Update the playback parameters (for all sounds currently playing)
void criAtomExPlayer_SetBiquadFilterParameters(CriAtomExPlayerHn player, CriAtomExBiquadFilterType type, CriFloat32 frequency, CriFloat32 gain, CriFloat32 q_value)
Set the biquad filter parameters.
void criAtomExPlayer_SetBandpassFilterParameters(CriAtomExPlayerHn player, CriFloat32 cof_low, CriFloat32 cof_high)
Set the band pass filter parameters.