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

结构体

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.
更多...
 
struct  CriAtomConfigTag_PC
 Configuration structure used for the initialization of the Atom library 更多...
 
struct  CriAtomExConfigTag_PC
 Configuration structure used for the initialization of the Atom library 更多...
 

宏定义

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

类型定义

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.
更多...
 
typedef struct CriAtomConfigTag_PC CriAtomConfig_PC
 Configuration structure used for the initialization of the Atom library 更多...
 
typedef struct CriAtomExConfigTag_PC CriAtomExConfig_PC
 Configuration structure used for the initialization of the Atom library 更多...
 

函数

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

详细描述





宏定义说明

◆ criAtom_SetDefaultConfig_PC

#define criAtom_SetDefaultConfig_PC (   p_config)
值:
{ \
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.

参数
[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.
注意
This macro is for the low level API.
When using the functions of the AtomEx layer, use the criAtomEx_SetDefaultConfig_PC macro instead.
参见
CriAtomConfig_PC

◆ criAtomEx_SetDefaultConfig_PC

#define criAtomEx_SetDefaultConfig_PC (   p_config)
值:
{ \
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.

参数
[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.
参见
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

参数
[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.
注意
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.
参见
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

返回
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.
注意
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.)
参见
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

参数
[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.
注意
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.
参见
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

返回
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.
注意
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.)
参见
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

参数
[in]configconfiguration structure for the initialization
返回
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.
注意
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.
参见
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

参数
[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.
注意
This function cannot be used conjointly with:
参见
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.
注意
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.
参见
criAtomEx_InitializeForUserPcmOutput_PC

类型定义说明

◆ 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.

参见
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.
注意
This structure is used for low level API.
When using the functions of the AtomEx layer, use the use the CriAtomExConfig_PC structure instead.
参见
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.
参见
criAtomEx_Initialize_PC, criAtomEx_SetDefaultConfig_PC

函数说明

◆ criAtom_CalculateWorkSize_PC()

CriSint32 criAtom_CalculateWorkSize_PC ( const CriAtomConfig_PC config)

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

参数
[in]configconfiguration structure for the initialization
返回
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.
注意
This function is for the low level API.
When using the functions of the AtomEx layer, call criAtomEx_CalculateWorkSize_PC instead.
参见
CriAtomConfig_PC, criAtom_Initialize_PC

◆ criAtom_Initialize_PC()

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

Initialize the library

参数
[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.
注意
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.

参见
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.
注意
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.

参见
criAtom_Initialize_PC

◆ criAtom_SetThreadPriority_PC()

void criAtom_SetThreadPriority_PC ( int  prio)

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

参数
[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.
注意
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.
参见
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

返回
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.
注意
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.)
参见
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

参数
[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.
注意
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.
参见
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

返回
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.
注意
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.)
参见
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

参数
[in]configconfiguration structure for the initialization
返回
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.
注意
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.
参见
CriAtomExConfig_PC, criAtomEx_Initialize_PC

◆ criAtomEx_Initialize_PC()

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

Initialize the library

参数
[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.
注意
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.

参见
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.
注意
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.

参见
criAtomEx_Initialize_PC