CRI ADX  Last Updated: 2024-07-17 10:48 p
CriAtomConfigTag结构体 参考

Configuration structure for initializing library 更多...

#include <cri_le_atom.h>

成员变量

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

详细描述

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.
注意
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.)
参见
criAtom_Initialize, criAtom_SetDefaultConfig

结构体成员变量说明

◆ thread_model

CriAtomThreadModel thread_model

Threading models

Description:
Specifies the threading model for the CRI Atom library.
参见
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.
注意
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.
参见
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.
参见
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.
参见
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.
注意
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.
注意
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.
参见
criAtomPlayer_CreateStandardPlayer, criAtomPlayer_Destroy

该结构体的文档由以下文件生成: