CRI ADX  Last Updated: 2024-07-17 10:47 p
Playback by Changing Parameters

Samples Directory

/CRIWARE/SDK/pc/samples/criatomex/playback_param


Sample Description

In CRI Atom, you can change the player parameters such as volume, playback pitch, filter cutoff frequency at the time of playback.

Each parameter can be modified before and while playing back the player.
Parameters are set to the player using specific parameter setting functions.
You must call the criAtomExPlayer_UpdateAll function on the player to apply the settings to the player.

Following is a code to set player parameters and apply low-pass filter.

/* 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.