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

Data Structures

struct  CriAtomAsrConfigTag
 ASR initialization configuration structureThis is a structure to specify the behavior of the software sound renderer ASR.
This structure is specified as an argument of the criAtomAsr_Initialize function.
More...
 

Macros

#define criAtomMeter_SetDefaultConfigForLoudnessMeter(p_config)
 Sets default values for the loudness meter function configuration structure. More...
 
#define criAtomMeter_SetDefaultConfigForTruePeakMeter(p_config)
 Sets default values for the true peak meter function configuration structure. More...
 
#define criAtomExAsrRack_SetDefaultConfig(p_config)
 Setting default parameters for CriAtomAsrConfig. More...
 
#define criAtomAsr_SetDefaultConfig(p_config)
 Set default parameters for CriAtomAsrConfig. More...
 
#define criAtomPlayer_SetDefaultConfig_ASR(p_config)
 Setting the default parameter to CriAtomPlayerConfig_ASR. More...
 

Typedefs

typedef struct CriAtomAsrConfigTag CriAtomAsrConfig
 ASR initialization configuration structureThis is a structure to specify the behavior of the software sound renderer ASR.
This structure is specified as an argument of the criAtomAsr_Initialize function.
More...
 

Functions

CriSint32 criAtomAsr_CalculateWorkSize (const CriAtomAsrConfig *config)
 Calculate work area size required for initializing ASR. More...
 
void criAtomAsr_Initialize (const CriAtomAsrConfig *config, void *work, CriSint32 work_size)
 Initialize ASR. More...
 
void criAtomAsr_Finalize (void)
 End ASR. More...
 

Detailed Description

Macro Definition Documentation

◆ criAtomMeter_SetDefaultConfigForLoudnessMeter

#define criAtomMeter_SetDefaultConfigForLoudnessMeter (   p_config)
Value:
{\
(p_config)->short_term_time = 3;\
(p_config)->integrated_time = 600;\
}

Sets default values for the loudness meter function configuration structure.

Description:
Configuration structure set for the criAtomMeter_AttachLoudnessMeter function. Sets the default values for ( CriAtomLoudnessMeterConfig ).
See also
criAtomMeter_AttachLoudnessMeter, CriAtomLoudnessMeterConfig

◆ criAtomMeter_SetDefaultConfigForTruePeakMeter

#define criAtomMeter_SetDefaultConfigForTruePeakMeter (   p_config)
Value:
{\
(p_config)->sample_clipping = CRI_TRUE;\
(p_config)->interval = 50;\
(p_config)->hold_time = 1000; \
}

Sets default values for the true peak meter function configuration structure.

Description:
Configuration structure set for the criAtomMeter_AttachTruePeakMeter function. Sets the default values for ( CriAtomTruePeakMeterConfig ).
See also
criAtomMeter_AttachTruePeakMeter, CriAtomTruePeakMeterConfig

◆ criAtomExAsrRack_SetDefaultConfig

#define criAtomExAsrRack_SetDefaultConfig (   p_config)
Value:
{\
(p_config)->server_frequency = 60.0f;\
(p_config)->num_buses = CRIATOMEXASR_DEFAULT_NUM_BUSES; \
(p_config)->output_channels = CRIATOM_DEFAULT_OUTPUT_CHANNELS;\
(p_config)->speaker_mapping = CRIATOM_SPEAKER_MAPPING_AUTO;\
(p_config)->output_sampling_rate = CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE;\
(p_config)->sound_renderer_type = CRIATOM_SOUND_RENDERER_NATIVE;\
(p_config)->output_rack_id = 0;\
(p_config)->context = NULL;\
}
#define CRIATOMEXASR_DEFAULT_NUM_BUSES
Default number of buses.
Definition: cri_le_atom_asr.h:52
@ CRIATOM_SPEAKER_MAPPING_AUTO
Definition: cri_le_atom.h:1208
@ CRIATOM_SOUND_RENDERER_NATIVE
Definition: cri_le_atom.h:812

Setting default parameters for CriAtomAsrConfig.

Parameters
[out]p_configPointer to the initialization configuration structure
Description:
Sets default values for the configuration structure ( CriAtomAsrConfig ) that is set for the criAtomAsr_Initialize function.
See also
CriAtomAsrConfig

◆ criAtomAsr_SetDefaultConfig

#define criAtomAsr_SetDefaultConfig (   p_config)
Value:
{\
(p_config)->server_frequency = 60.0f;\
(p_config)->num_buses = CRIATOMEXASR_DEFAULT_NUM_BUSES; \
(p_config)->output_channels = CRIATOM_DEFAULT_OUTPUT_CHANNELS;\
(p_config)->speaker_mapping = CRIATOM_SPEAKER_MAPPING_AUTO;\
(p_config)->output_sampling_rate = CRIATOM_DEFAULT_OUTPUT_SAMPLING_RATE;\
(p_config)->sound_renderer_type = CRIATOM_SOUND_RENDERER_NATIVE;\
(p_config)->context = NULL;\
(p_config)->max_racks = 8;\
(p_config)->ambisonics_order_type = CRIATOMAMBISONICS_ORDER_TYPE_NONE;\
}
@ CRIATOMAMBISONICS_ORDER_TYPE_NONE
Definition: cri_le_atom.h:7815

Set default parameters for CriAtomAsrConfig.

Parameters
[out]p_configPointer to the configuration structure for initialization
Description:
Sets default values for a configuration structure ( CriAtomAsrConfig ) that is set for the criAtomAsr_Initialize function.
See also
CriAtomAsrConfig

◆ criAtomPlayer_SetDefaultConfig_ASR

#define criAtomPlayer_SetDefaultConfig_ASR (   p_config)
Value:
{ \
(p_config)->max_routes = CRIATOMEXASR_DEFAULT_NUM_ROUTES; \
}
#define CRIATOMEXASR_DEFAULT_NUM_ROUTES
Default number of potential send buses.
Definition: cri_le_atom_asr.h:44

Setting the default parameter to CriAtomPlayerConfig_ASR.

Parameters
[in]p_configPointer to the configuration structure used to create the player.
Description:
When creating a player, initializes the configuration structure ( CriAtomPlayerConfig_ASR ) with default values that will determine its operation.
See also
CriAtomPlayerConfig_ASR

Typedef Documentation

◆ CriAtomAsrConfig

ASR initialization configuration structureThis is a structure to specify the behavior of the software sound renderer ASR.
This structure is specified as an argument of the criAtomAsr_Initialize function.

Remarks:
When using default settings, after setting default parameters for the structure using the criAtomAsr_SetDefaultConfig macro, specify the structure in the criAtomAsr_Initialize function.
Attention
More members will be added in the future. So, when not using the criAtomAsr_SetDefaultConfig macro, make sure to initialize the structure to zero before using it.
(Make sure that no indefinite value is set to any member of the structure.)
See also
criAtomAsr_Initialize, criAtomAsr_SetDefaultConfig

Function Documentation

◆ criAtomAsr_CalculateWorkSize()

CriSint32 criAtomAsr_CalculateWorkSize ( const CriAtomAsrConfig config)

Calculate work area size required for initializing ASR.

Parameters
[in]configConfiguration structure for ASR initialization
Description:
Obtains the work area size required for initializing the software sound renderer ASR.
If you are not using the criAtom_SetUserAllocator macro to register the allocator, but using the criAtomAsr_Initialize function to initialize ASR, as much memory area as the size calculated by this function must be passed as the work area.

If work area size calculation fails, this function returns -1.
The reason for work area size calculation failure can be determined by viewing the error callback message.
Remarks:
The working memory size required for initializing ASR varies depending on the contents of the configuration structure ( CriAtomAsrConfig ) for initializing ASR.

If you specify NULL as argument, the work area size is calculated using the default setting (i.e., the same parameters as when criAtomAsr_SetDefaultConfig is used) are used for calculating the work area size.
Information in argument config is referenced only within the function.
It is not referenced after exiting the function and its area can be released after executing the function.
See also
criAtom_SetUserAllocator, criAtomAsr_Initialize

◆ criAtomAsr_Initialize()

void criAtomAsr_Initialize ( const CriAtomAsrConfig config,
void *  work,
CriSint32  work_size 
)

Initialize ASR.

Parameters
[in]configConfiguration structure for ASR initialization
[in]workwork area
[in]work_sizework area size
Description:
Initializes the software sound renderer ASR.
By executing this function, ASR is initiated and ASR starts outputting rendering results.
Remarks:
The working memory size required for initializing ASR varies depending on the contents of the configuration structure ( CriAtomAsrConfig ) for initializing ASR.

When NULL is specified for the argument, default settings
(i.e., the same parameters as when criAtomAsr_SetDefaultConfig is used) are used for initialization.

Information in the argument config is referenced only within the function.
It is not referenced after exiting the function and its area can be released after executing the function.
Attention
You must initialize the library before executing this function.

This function is a blocking function.
Once this function is executed, server processing of the Atom library is blocked for a while.
If this function is executed during audio playback, problems such as interruption of playback may occur. Call this function only when load fluctuations are acceptable, for example, when a game scene is changed.
After executing this function, always execute the criAtomAsr_Finalize function.
Also, before executing the criAtomAsr_Finalize function, do not execute this function again.
See also
criAtom_SetUserAllocator, criAtomAsr_Finalize

◆ criAtomAsr_Finalize()

void criAtomAsr_Finalize ( void  )

End ASR.

Description:
Performs termination processing of the software sound renderer ASR.
By executing this function, output of rendering results is stopped.
If the allocator is registered with the criAtom_SetUserAllocator macro, this function releases the memory area allocated when ASR is initialized.
(If you pass a work area during ASR initialization, the work area can be released after executing this function.)
Attention
This function is a blocking function.
Once this function is executed, server processing of the Atom library is blocked for a while.
If this function is executed during audio playback, problems such as interruption of playback may occur.
Call this function only when load fluctuations are acceptable, for example, when a game scene is changed.
See also
criAtom_SetUserAllocator, criAtomAsr_Initialize