CRI ADX  Last Updated: 2025-05-07 13:34 p
Game loop 30fps

Sample directory

/cri/pc/samples/criatomex/game_loop_30fps

Data used in the sample

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

Sample description

  • CRI Atom has streaming playback function
  • For streaming playback, the operating frequency (operation interval) of the server process is very important
  • The operating frequency of the server process of CRI Atom is specified at initialization
Below is the code to operate the server process at 30fps.
CriAtomExConfig atomex_config;
/* Initialize library setting parameters */
/* Modify server execution frequency */
atomex_config.server_frequency = 30.0f;
/* Initialize the library */
criAtomEx_Initialize(&atomex_config, NULL, 0);
CriBool criAtomEx_Initialize(const CriAtomExConfig *config, void *work, CriSint32 work_size)
Initialize the library.
#define criAtomEx_SetDefaultConfig(p_config)
Assign the default values to the configuration structure used for the library's initialization.
Definition: cri_le_atom_ex.h:322
Configuration structure used to initialize the Atom libraryThis structure is used to specify the beha...
Definition: cri_le_atom_ex.h:1461
CriFloat32 server_frequency
Execution frequency of the server process.
Definition: cri_le_atom_ex.h:1521
Attention
If the game loop of your application is 30fps, it may be more efficient in terms of CPU load to set the server processing frequency of CRI Atom to 30fps as well. In that case, it is assumed that the app can tolerate some delay in the pronunciation of audio data.