CRI ADX  Last Updated: 2024-07-17 10:47 p
Game Loop 30fps

Samples Directory

/CRIWARE/SDK/pc/samples/criatomex/game_loop_30fps


Sample Description

Since CRI Atom also handles streaming playback, execution interval of the server processing is very important.

In applications where game loop is designed as 30fps, if certain latency of sound data is acceptable, average CPU load is effective when the server processing of CRI Atom is also executed at 30fps.
Execution frequency of the server processing in CRI Atom is specified when initializing the library.

The following is a code to execute the server processing 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