CRI ADX  Last Updated: 2024-07-17 10:47 p
CriAtomConfigTag Struct Reference

Configuration structure for initializing library. More...

#include <cri_le_atom.h>

Data Fields

CriAtomThreadModel thread_model
 Threading models. More...
 
CriFloat32 server_frequency
 Execution frequency of server process. More...
 
const CriFsConfigfs_config
 Pointer to CRI File System initialization parameters. More...
 
void * context
 Pointer to platform-specific initialization parameters. More...
 
CriUint32 version
 Library version number. More...
 
const CriChar8 * version_string
 Library version string. More...
 
CriSint32 max_players
 Maximum number of players. More...
 

Detailed Description

Configuration structure for initializing library.

Description:
Structure used for specifying the behavior of the CRI Atom library.
This structure is specified as an argument of the criAtom_Initialize function.

When the CRI Atom library is initialized, as much internal resources as needed are allocated for the library based on the settings specified in the structure.
The size of the work area needed for the library varies depending on the parameters specified in the structure.
Remarks:
When using default settings, after setting default parameters for the structure using the criAtom_SetDefaultConfig macro, specify the structure for the criAtom_Initialize function.
Attention
More members will be added in the future. The structure must be initialized with the criAtom_SetDefaultConfig macro.
(Make sure that no indefinite value is set to any member of the structure.)
See also
criAtom_Initialize, criAtom_SetDefaultConfig

Field Documentation

◆ thread_model

CriAtomThreadModel thread_model

Threading models.

Description:
Specifies the threading model for the CRI Atom library.
See also
CriAtomThreadModel

◆ server_frequency

CriFloat32 server_frequency

Execution frequency of server process.

Description:
Specifies the execution frequency of the server process.
Typically, this should be set to the same value as the frame rate of the application.

The CRI Atom library performs most of the work inside the library such as managing file reading, decoding sound data, playing sound, or updating the status, in a single function.
In CRI Middleware, the function which performs the work inside the library collectively like this is called a "server process."

When the threading model is CRIATOM_THREAD_MODEL_MULTI , the server process is regularly executed in threads created by the CRI Atom library.
When the threading model is CRIATOM_THREAD_MODEL_SINGLE or CRIATOM_THREAD_MODEL_USER_MULTI , the server process is executed in the criAtom_ExecuteMain function.

Specify the execution frequency of the server process for server_frequency.
When the threading model is CRIATOM_THREAD_MODEL_MULTI , the CRI Atom library adjusts the interval for calling the server process so that the server process can be executed at the specified frequency.
When the threading model is CRIATOM_THREAD_MODEL_SINGLE or CRIATOM_THREAD_MODEL_USER_MULTI , the user must execute the criAtom_ExecuteMain function more frequently than specified by server_frequency.

If the fluctuation of the frame rate of the application is very large and unevenness occurs every time the server process is executed, specify the value of server_frequency assuming the worst frame rate or specify CRIATOM_THREAD_MODEL_MULTI for the threading model.
Remarks:
If the frequency of executing the server process is increased, amount of the work per server process (such as the amount of decoding tasks) will decrease. As a result, the load per server process becomes small (the load is distributed). However, overhead for executing the server process becomes large.
(If the frequency of executing the server process is increased under an environment in which the CPU resource is limited such as portable game machine, the overhead for executing the server process may become too great to ignore.)

If the frequency of executing the server process is decreased, amount of the work per server process will increase.
Although the overhead for executing the server process is reduced, since the load per server process becomes higher, problems such as dropped frames may occur.
Attention
When CRIATOM_THREAD_MODEL_SINGLE or CRIATOM_THREAD_MODEL_USER_MULTI is specified for the threading model but the criAtom_ExecuteMain function is not executed more frequently than the frequency specified by server_frequency, problems such as interruption of playback may occur.
See also
criAtom_ExecuteMain

◆ fs_config

const CriFsConfig* fs_config

Pointer to CRI File System initialization parameters.

Description:
Specifies the pointer to CRI File System initialization parameters. If NULL is specified, the CRI File System is initialized using the default parameters.
See also
criAtom_Initialize

◆ context

void* context

Pointer to platform-specific initialization parameters.

Description:
Specifies the pointer to platform-specific initialization parameters required for operating the CRI Atom library. If NULL is specified, an initialization required for each platform is performed with default parameters.
Parameter structures are defined in each platform-specific header. If parameter structures are not defined for a platform, always specify NULL.
See also
criAtom_Initialize

◆ version

CriUint32 version

Library version number.

Description:
The CRI Atom Library version number.
The version number defined in this header is set by the criAtom_SetDefaultConfig macro.
Attention
Do not change this value in your applications.

◆ version_string

const CriChar8* version_string

Library version string.

Description:
The version string of the CRI Atom library.
The criAtom_SetDefaultConfig macro sets the version string defined in this header.
Attention
Applications should not change this value.

◆ max_players

CriSint32 max_players

Maximum number of players.

Description:
Specifies the number of players (CriAtomPlayer) used in the application.
When using the criAtomPlayer_CreateStandardPlayer function to create players in an application, the number of players used must be specified in this parameter.

For max_players, specify the maximum number of players used simultaneously.
For example, if the criAtomPlayer_CreateStandardPlayer and criAtomPlayer_Destroy functions are used alternately to create and destroy players, only one player is ever in use at the same time, so max_players can be set to 1 regardless of the number of times the create function is called.
Conversely, if in one scene 10 players are used simultaneously but no players are used at all elsewhere, this still requires max_players to be set to 10.
See also
criAtomPlayer_CreateStandardPlayer, criAtomPlayer_Destroy

The documentation for this struct was generated from the following file: