CRI ADX  Last Updated: 2024-07-17 10:47 p
CriAtom PC API

Data Structures

struct  CriAtomExConfigForUserPcmOutputTag
 Configuration structure for Atom library initializationStructure used to specify the behavior of the CRI Atom library.
It is passed as an argument to the criAtomEx_InitializeForUserPcmOutput function.
More...
 
struct  CriAtomConfigTag_PC
 Configuration structure used for the initialization of the Atom library. More...
 
struct  CriAtomExConfigTag_PC
 Configuration structure used for the initialization of the Atom library. More...
 

Macros

#define criAtom_SetDefaultConfig_PC(p_config)
 Assign the default values to the configuration structure used for the library's initialization. More...
 
#define criAtomEx_SetDefaultConfig_PC(p_config)
 Assign the default values to the configuration structure used for the library's initialization. More...
 
#define criAtomEx_SetThreadPriority_PC(prio)    criAtom_SetThreadPriority_PC(prio)
 Change the priority of the thread on which runs the server process. More...
 
#define criAtomEx_GetThreadPriority_PC()    criAtom_GetThreadPriority_PC()
 Get the priority of the thread on which runs the server process. More...
 
#define criAtomEx_SetThreadAffinityMask_PC(mask)    criAtom_SetThreadAffinityMask_PC(mask)
 Change the affinity mask of the thread on which the server process runs. More...
 
#define criAtomEx_GetThreadAffinityMask_PC()    criAtom_GetThreadAffinityMask_PC()
 Get the affinity mask of the thread on which runs the server process. More...
 
#define criAtomEx_CalculateWorkSizeForUserPcmOutput_PC(config)    criAtomEx_CalculateWorkSizeForUserPcmOutput(config)
 Calculate the size of the work buffer required for the user PCM output method. More...
 
#define criAtomEx_InitializeForUserPcmOutput_PC(config, work, work_size)    criAtomEx_InitializeForUserPcmOutput(config, work, work_size)
 Initialize the user PCM output library. More...
 
#define criAtomEx_FinalizeForUserPcmOutput_PC()    criAtomEx_FinalizeForUserPcmOutput()
 Finalize the user PCM output library. More...
 

Typedefs

typedef struct CriAtomExConfigForUserPcmOutputTag CriAtomExConfigForUserPcmOutput
 Configuration structure for Atom library initializationStructure used to specify the behavior of the CRI Atom library.
It is passed as an argument to the criAtomEx_InitializeForUserPcmOutput function.
More...
 
typedef struct CriAtomConfigTag_PC CriAtomConfig_PC
 Configuration structure used for the initialization of the Atom library. More...
 
typedef struct CriAtomExConfigTag_PC CriAtomExConfig_PC
 Configuration structure used for the initialization of the Atom library. More...
 

Functions

CriSint32 criAtom_CalculateWorkSize_PC (const CriAtomConfig_PC *config)
 Calculate the size of the work buffer required to initialize the library. More...
 
void criAtom_Initialize_PC (const CriAtomConfig_PC *config, void *work, CriSint32 work_size)
 Initialize the library. More...
 
void criAtom_Finalize_PC (void)
 Finalize the library. More...
 
void criAtom_SetThreadPriority_PC (int prio)
 Change the priority of the thread on which runs the server process. More...
 
int criAtom_GetThreadPriority_PC (void)
 Get the priority of the thread on which runs the server process. More...
 
void criAtom_SetThreadAffinityMask_PC (DWORD_PTR mask)
 Change the affinity mask of the thread on which the server process runs. More...
 
DWORD_PTR criAtom_GetThreadAffinityMask_PC (void)
 Get the affinity mask of the thread on which runs the server process. More...
 
CriSint32 criAtomEx_CalculateWorkSize_PC (const CriAtomExConfig_PC *config)
 Calculate the size of the work buffer required to initialize the library. More...
 
void criAtomEx_Initialize_PC (const CriAtomExConfig_PC *config, void *work, CriSint32 work_size)
 Initialize the library. More...
 
void criAtomEx_Finalize_PC (void)
 Finalize the library. More...
 

Detailed Description

Macro Definition Documentation

◆ criAtom_SetDefaultConfig_PC

#define criAtom_SetDefaultConfig_PC (   p_config)
Value:
{ \
criAtom_SetDefaultConfig(&(p_config)->atom); \
criAtomAsr_SetDefaultConfig(&(p_config)->asr); \
criAtomHcaMx_SetDefaultConfig(&(p_config)->hca_mx); \
}

Assign the default values to the configuration structure used for the library's initialization.

Parameters
[out]p_configpointer to the configuration structure used for the library's initialization.
Description:
Assign the default values to the configuration structure (CriAtomConfig_PC) that is passed to the criAtom_Initialize_PC function.
Attention
This macro is for the low level API.
When using the functions of the AtomEx layer, use the criAtomEx_SetDefaultConfig_PC macro instead.
See also
CriAtomConfig_PC

◆ criAtomEx_SetDefaultConfig_PC

#define criAtomEx_SetDefaultConfig_PC (   p_config)
Value:
{ \
criAtomEx_SetDefaultConfig(&(p_config)->atom_ex); \
criAtomExAsr_SetDefaultConfig(&(p_config)->asr); \
criAtomExHcaMx_SetDefaultConfig(&(p_config)->hca_mx); \
}

Assign the default values to the configuration structure used for the library's initialization.

Parameters
[out]p_configpointer to the configuration structure used for the library's initialization.
Description:
Assign the default values to the configuration structure ( CriAtomExConfig_PC ) that is is passed to the criAtomEx_Initialize_PC function.
See also
CriAtomExConfig_PC

◆ criAtomEx_SetThreadPriority_PC

#define criAtomEx_SetThreadPriority_PC (   prio)     criAtom_SetThreadPriority_PC(prio)

Change the priority of the thread on which runs the server process.

Parameters
[in]priothread priority
Description:
This function changes the priority of the thread executing the server process (the library's internal process).
By default (when this function is not executed), the priority of the server process thread is set to THREAD_PRIORITY_HIGHEST.
Attention
This function is only effective when the threading model is set to multithreading ( CRIATOM_THREAD_MODEL_MULTI ) during the library initialization.
If a different threading model is selected, this function does not do anything.
(An error callback occurs.)

This function must be executed between the initialization and finalization processes.
It will have no effect if it is executed before initialization or after finalization.
(An error callback occurs.)

The server process thread is used by the CRI File System library as well.
Note that if you already changed the priority of the server process thread through the API of the CRI File System library, it will be overwritten when calling this function.
See also
criAtomEx_Initialize_PC, criAtomEx_GetThreadPriority_PC

◆ criAtomEx_GetThreadPriority_PC

#define criAtomEx_GetThreadPriority_PC ( )     criAtom_GetThreadPriority_PC()

Get the priority of the thread on which runs the server process.

Returns
int thread priority
Description:
This function gets the priority of the thread executing the server process (the library's internal process).
If successful, this function returns the priority.
Otherwise, it returns THREAD_PRIORITY_ERROR_RETURN.
Attention
This function is only effective when the threading model is set to multithreading ( CRIATOM_THREAD_MODEL_MULTI ) during the library initialization.
If a different threading model is selected, this function does not do anything.
(An error callback occurs.)

This function must be executed between the initialization and finalization processes.
It will have no effect if it is executed before initialization or after finalization.
(An error callback occurs.)
See also
criAtomEx_Initialize_PC, criAtomEx_SetThreadPriority_PC

◆ criAtomEx_SetThreadAffinityMask_PC

#define criAtomEx_SetThreadAffinityMask_PC (   mask)     criAtom_SetThreadAffinityMask_PC(mask)

Change the affinity mask of the thread on which the server process runs.

Parameters
[in]maskthread affinity mask
Description:
This function changes the affinity mask of the thread executing the server process (the library's internal process).
By default (when this function is not executed), the processor running the server process is unrestricted.
Attention
This function is only effective when the threading model is set to multithreading ( CRIATOM_THREAD_MODEL_MULTI ) during the library initialization.
If a different threading model is selected, this function does not do anything.
(An error callback occurs.)

This function must be executed between the initialization and finalization processes.
It will have no effect if it is executed before initialization or after finalization.
(An error callback occurs.)

The server process thread is used by the CRI File System library as well.
Note that if you already changed the affinity mask of the server process thread through the API of the CRI File System library, it will be overwritten when calling this function.
See also
criAtomEx_Initialize_PC, criAtomEx_GetThreadAffinityMask_PC

◆ criAtomEx_GetThreadAffinityMask_PC

#define criAtomEx_GetThreadAffinityMask_PC ( )     criAtom_GetThreadAffinityMask_PC()

Get the affinity mask of the thread on which runs the server process.

Returns
DWORD_PTR thread affinity mask
Description:
This function gets the affinity mask of the thread executing the server process (the library's internal process).
If successful, this function returns the affinity mask of the thread.
Otherwise, it returns 0.
Attention
This function is only effective when the threading model is set to multithreading ( CRIATOM_THREAD_MODEL_MULTI ) during the library initialization.
If a different threading model is selected, this function does not do anything.
(An error callback occurs.)

This function must be executed between the initialization and finalization processes.
It will have no effect if it is executed before initialization or after finalization.
(An error callback occurs.)
See also
criAtomEx_Initialize_PC, criAtomEx_SetThreadAffinityMask_PC

◆ criAtomEx_CalculateWorkSizeForUserPcmOutput_PC

#define criAtomEx_CalculateWorkSizeForUserPcmOutput_PC (   config)     criAtomEx_CalculateWorkSizeForUserPcmOutput(config)

Calculate the size of the work buffer required for the user PCM output method.

Parameters
[in]configconfiguration structure for the initialization
Returns
CriSint32 work buffer size
Description:
Calculate the size of the work buffer required to initialize the library in the user PCM output mode.
Remarks:
The size depends on the values of the parameters in the CriAtomExConfig_PC structure.

The information passed in the config argument is only referenced within this function.
Therefore the memory it uses can be released after executing the function.
Attention
This function is used when initializing the library with the criAtomEx_InitializeForUserPcmOutput_PC function.
Note that when you use the criAtomEx_Initialize_PC function, you should call the criAtomEx_CalculateWorkSize_PC function to get the size of the work buffer.
See also
CriAtomExConfig_PC, criAtomEx_InitializeForUserPcmOutput_PC

◆ criAtomEx_InitializeForUserPcmOutput_PC

#define criAtomEx_InitializeForUserPcmOutput_PC (   config,
  work,
  work_size 
)     criAtomEx_InitializeForUserPcmOutput(config, work, work_size)

Initialize the user PCM output library.

Parameters
[in]configconfiguration structure for the initialization
[in]workwork buffer
[in]work_sizework buffer size
Description:
Initializes the library in the user PCM output mode.

When initialized using this function, the Atom library does not perform sound output.
Instead, the application must get the PCM data periodically from the library using the criAtomExAsr_GetPcmDataFloat32 function and perform the sound output itself.
Attention
This function cannot be used conjointly with:
See also
CriAtomExConfig_PC, criAtomEx_FinalizeForUserPcmOutput_PC, criAtomExAsr_GetPcmDataFloat32, criAtomEx_CalculateWorkSizeForUserPcmOutput_PC

◆ criAtomEx_FinalizeForUserPcmOutput_PC

#define criAtomEx_FinalizeForUserPcmOutput_PC ( )     criAtomEx_FinalizeForUserPcmOutput()

Finalize the user PCM output library.

Description:
Performs the finalization of the library initialized in the user PCM output mode.
Attention
This function should be used to finalize the library if it was initialized with criAtomEx_InitializeForUserPcmOutput_PC.
Note that if the library was initialized using the criAtomEx_Initialize_PC function, you must use the criAtomEx_Finalize_PC function instead.
See also
criAtomEx_InitializeForUserPcmOutput_PC

Typedef Documentation

◆ CriAtomExConfigForUserPcmOutput

Configuration structure for Atom library initializationStructure used to specify the behavior of the CRI Atom library.
It is passed as an argument to the criAtomEx_InitializeForUserPcmOutput function.

See also
criAtomEx_InitializeForUserPcmOutput, criAtomEx_SetDefaultConfigForUserPcmOutput

◆ CriAtomConfig_PC

Configuration structure used for the initialization of the Atom library.

Description:
This configuration structure is used to specify the behavior of the CRI Atom library.
It is passed as an argument to the criAtom_Initialize_PC function.
Attention
This structure is used for low level API.
When using the functions of the AtomEx layer, use the use the CriAtomExConfig_PC structure instead.
See also
criAtom_Initialize_PC, criAtom_SetDefaultConfig_PC

◆ CriAtomExConfig_PC

Configuration structure used for the initialization of the Atom library.

Description:
This configuration structure is used to specify the behavior of the CRI Atom library.
It is passed as an argument to the criAtomEx_Initialize_PC function.
See also
criAtomEx_Initialize_PC, criAtomEx_SetDefaultConfig_PC

Function Documentation

◆ criAtom_CalculateWorkSize_PC()

CriSint32 criAtom_CalculateWorkSize_PC ( const CriAtomConfig_PC config)

Calculate the size of the work buffer required to initialize the library.

Parameters
[in]configconfiguration structure for the initialization
Returns
CriSint32 work buffer size
Description:
This function retrieves the size of the work buffer needed to use the library.
Remarks:
The size of the work buffer needed by the library's initialization depends on the values of the parameters in the CriAtomConfig_PC structure.

The information passed in the config argument is only referenced within this function.
Therefore the memory it uses can be released after executing the function.
Attention
This function is for the low level API.
When using the functions of the AtomEx layer, call criAtomEx_CalculateWorkSize_PC instead.
See also
CriAtomConfig_PC, criAtom_Initialize_PC

◆ criAtom_Initialize_PC()

void criAtom_Initialize_PC ( const CriAtomConfig_PC config,
void *  work,
CriSint32  work_size 
)

Initialize the library.

Parameters
[in]configinitialization configuration structure
[in]workwork buffer
[in]work_sizework buffer size
Description:
This function initializes the library.
In order to be able to use the features of the library, you must first call this function.
(Once this function is called, the features of the library are available until the criAtom_Finalize_PC function is called.)

To initialize the library, you must allocate a memory area (work buffer) that will be used internally by the library.
The size of the work buffer needed by the library depends on the values of the parameters in the configuration structure used for initialization.
Use the criAtom_CalculateWorkSize_PC function to calculate the work buffer size.
Remarks:
If an allocator has already been registered with the criAtom_SetUserAllocator macro, the work buffer size does not need to be specified.
(By passing NULL for work and 0 for work_size, the amount of memory corresponding to the work buffer size is dynamically allocated by the registered allocator.)
The information passed in the config argument is only referenced within this function.
Therefore the memory it uses can be released after executing the function.
Attention
This function internally calls:

Therefore, if you call this function, do not call the functions listed above.

If call this function, you must always call the criAtom_Finalize_PC function later.
Do not call this function again until you have called the criAtom_Finalize_PC function.

This function is for the low level API.
When using the functions of the AtomEx layer, call criAtomEx_Initialize_PC instead.

See also
CriAtomConfig_PC, criAtom_Finalize_PC, criAtom_SetUserAllocator, criAtom_CalculateWorkSize_PC

◆ criAtom_Finalize_PC()

void criAtom_Finalize_PC ( void  )

Finalize the library.

Description:
This function finalizes the library.
Attention
This function calls the following functions internally:

Therefore, if you call this function, do not call the functions above.

This function cannot be called before the criAtom_Initialize_PC function is called.

This function is for the low level API.
When using the functions of the AtomEx layer, call criAtomEx_Finalize_PC instead.

See also
criAtom_Initialize_PC

◆ criAtom_SetThreadPriority_PC()

void criAtom_SetThreadPriority_PC ( int  prio)

Change the priority of the thread on which runs the server process.

Parameters
[in]priothread priority
Description:
This function changes the priority of the thread executing the server process (the library's internal process).
By default (when this function is not executed), the priority of the server process thread is set to THREAD_PRIORITY_HIGHEST.
Attention
This function is only effective when the threading model is set to multithreading ( CRIATOM_THREAD_MODEL_MULTI ) during the library initialization.
If a different threading model is selected, this function does not do anything.
(An error callback occurs.)

This function must be executed between the initialization and finalization processes.
It will have no effect if it is executed before initialization or after finalization.
(An error callback occurs.)
The server process thread is used by the CRI File System library as well.
Note that if you already changed the priority of the server process thread through the API of the CRI File System library, it will be overwritten when calling this function.
See also
criAtom_Initialize_PC, criAtom_GetThreadPriority_PC

◆ criAtom_GetThreadPriority_PC()

int criAtom_GetThreadPriority_PC ( void  )

Get the priority of the thread on which runs the server process.

Returns
int thread priority
Description:
This function gets the priority of the thread executing the server process (the library's internal process).
If successful, this function returns the priority.
Otherwise, it returns THREAD_PRIORITY_ERROR_RETURN.
Attention
This function is only effective when the threading model is set to multithreading ( CRIATOM_THREAD_MODEL_MULTI ) during the library initialization.
If a different threading model is selected, this function does not do anything.
(An error callback occurs.)

This function must be executed between the initialization and finalization processes.
It will have no effect if it is executed before initialization or after finalization.
(An error callback occurs.)
See also
criAtom_Initialize_PC, criAtom_SetThreadPriority_PC

◆ criAtom_SetThreadAffinityMask_PC()

void criAtom_SetThreadAffinityMask_PC ( DWORD_PTR  mask)

Change the affinity mask of the thread on which the server process runs.

Parameters
[in]maskthread affinity mask
Description:
This function changes the affinity mask of the thread executing the server process (the library's internal process).
By default (when this function is not executed), the processor running the server process is unrestricted.
Attention
This function is only effective when the threading model is set to multithreading ( CRIATOM_THREAD_MODEL_MULTI ) during the library initialization.
If a different threading model is selected, this function does not do anything.
(An error callback occurs.)

This function must be executed between the initialization and finalization processes.
It will have no effect if it is executed before initialization or after finalization.
(An error callback occurs.)
The server process thread is used by the CRI File System library as well.
Note that if you already changed the affinity mask of the server process thread through the API of the CRI File System library, it will be overwritten when calling this function.
See also
criAtom_Initialize_PC, criAtom_GetThreadAffinityMask_PC

◆ criAtom_GetThreadAffinityMask_PC()

DWORD_PTR criAtom_GetThreadAffinityMask_PC ( void  )

Get the affinity mask of the thread on which runs the server process.

Returns
DWORD_PTR thread affinity mask
Description:
This function gets the affinity mask of the thread executing the server process (the library's internal process).
If successful, this function returns the affinity mask of the thread.
Otherwise, it returns 0.
Attention
This function is only effective when the threading model is set to multithreading ( CRIATOM_THREAD_MODEL_MULTI ) during the library initialization.
If a different threading model is selected, this function does not do anything.
(An error callback occurs.)

This function must be executed between the initialization and finalization processes.
It will have no effect if it is executed before initialization or after finalization.
(An error callback occurs.)
See also
criAtom_Initialize_PC, criAtom_SetThreadAffinityMask_PC

◆ criAtomEx_CalculateWorkSize_PC()

CriSint32 criAtomEx_CalculateWorkSize_PC ( const CriAtomExConfig_PC config)

Calculate the size of the work buffer required to initialize the library.

Parameters
[in]configconfiguration structure for the initialization
Returns
CriSint32 work buffer size
Description:
This function retrieves the size of the work buffer needed to use the library.
Remarks:
The size of the work buffer needed by the library's initialization depends on the values of the parameters in the CriAtomExConfig_PC structure.

The information passed in the config argument is only referenced within this function.
Therefore the memory it uses can be released after executing the function.
Attention
If a value is set to the acf_info member of the CriAtomExConfig structure, this function fails and -1 is returned.
When registering ACF data in initialization processing, it is necessary to allocate memory using the memory allocator by the ADX 2 system, not by securing memory using this function value.
See also
CriAtomExConfig_PC, criAtomEx_Initialize_PC

◆ criAtomEx_Initialize_PC()

void criAtomEx_Initialize_PC ( const CriAtomExConfig_PC config,
void *  work,
CriSint32  work_size 
)

Initialize the library.

Parameters
[in]configconfiguration structure for the initialization
[in]workwork buffer
[in]work_sizework buffer size
Description:
Initializes the library.
Before using the features of the library, always execute this function.
(After this function is executed, the features of the library are available until the criAtomEx_Finalize_PC function is executed.)

To initialize the library, you must allocate a memory area (work buffer) that will be used internally by the library.
The size of the work buffer needed by the library depends on the values of the parameters in the configuration structure used for initialization.
Use the criAtomEx_CalculateWorkSize_PC function to calculate the size of the work buffer.
Remarks:
If an allocator has already been registered with the criAtom_SetUserAllocator macro, the work buffer size does not need to be specified.
(By passing NULL for work and 0 for work_size, the amount of memory corresponding to the work buffer size is dynamically allocated by the registered allocator.)
The information passed in the config argument is only referenced within this function.
Therefore the memory it uses can be released after executing the function.
Attention
This function internally calls:

Therefore, if you call this function, do not call the functions listed above.

If you call this function, you must always call the criAtomEx_Finalize_PC function later.
Do not call this function again until you have called the criAtomEx_Finalize_PC function.

See also
CriAtomExConfig_PC, criAtomEx_Finalize_PC, criAtomEx_SetUserAllocator, criAtomEx_CalculateWorkSize_PC

◆ criAtomEx_Finalize_PC()

void criAtomEx_Finalize_PC ( void  )

Finalize the library.

Description:
This function finalizes the library.
Attention
This function internally calls.

Therefore, when calling this function, do not call the functions above.

This function cannot be called before the criAtomEx_Initialize_PC function is called.

See also
criAtomEx_Initialize_PC