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

Data Structures

struct  CriAtomConfigTag
 Configuration structure for initializing library. More...
 
struct  CriAtomPerformanceInfoTag
 Performance information. More...
 
struct  CriAtomFormatInfoTag
 Audio data format information. More...
 
struct  CriAtomStreamingInfoTag
 Streaming information. More...
 

Macros

#define criAtom_SetDefaultConfig(p_config)
 Set default parameters for CriAtomConfig. More...
 
#define criAtom_SetUserAllocator(p_malloc_func, p_free_func, p_obj)
 Register user allocator. More...
 

Typedefs

typedef enum CriAtomThreadModelTag CriAtomThreadModel
 Threading models. More...
 
typedef struct CriAtomConfigTag CriAtomConfig
 Configuration structure for initializing library. More...
 
typedef void *(* CriAtomMallocFunc) (void *obj, CriUint32 size)
 Memory allocation function. More...
 
typedef void(* CriAtomFreeFunc) (void *obj, void *mem)
 Memory deallocation function. More...
 
typedef void(* CriAtomAudioFrameStartCbFunc) (void *obj)
 Start audio frame callback function. More...
 
typedef void(* CriAtomAudioFrameEndCbFunc) (void *obj)
 End audio frame callback function. More...
 
typedef enum CriAtomSoundRendererTypeTag CriAtomSoundRendererType
 Sound renderer type. More...
 
typedef enum CriAtomSpeakerIdTag CriAtomSpeakerId
 Speaker ID. More...
 
typedef struct CriAtomPerformanceInfoTag CriAtomPerformanceInfo
 Performance information. More...
 
typedef enum CriAtomEncodeQualityTag CriAtomEncodeQuality
 Encoding quality. More...
 
typedef CriUint32 CriAtomFormat
 Format type. More...
 
typedef struct CriAtomFormatInfoTag CriAtomFormatInfo
 Audio data format information. More...
 
typedef enum CriAtomPcmFormatTag CriAtomPcmFormat
 PCM format. More...
 
typedef struct CriAtomStreamingInfoTag CriAtomStreamingInfo
 Streaming information. More...
 
typedef enum CriAtomVoiceStopReasonTag CriAtomVoiceStopReason
 Voice stop reason. More...
 
typedef void(* CriAtomDeviceUpdateCbFunc) (void *obj)
 Ambisonics order type. More...
 
typedef enum CriAtomDeviceTypeTag CriAtomDeviceType
 Device type. More...
 
typedef enum CriAtomSpeakerMappingTag CriAtomSpeakerMapping
 Speaker Mapping. More...
 
typedef enum CriAtomAmbisonicsOrderTypeTag CriAtomAmbisonicsOrderType
 Ambisonics Order (Discontinued) More...
 

Enumerations

enum  CriAtomThreadModelTag { CRIATOM_THREAD_MODEL_MULTI = 0 , CRIATOM_THREAD_MODEL_MULTI_WITH_SONICSYNC = 4 , CRIATOM_THREAD_MODEL_MULTI_USER_DRIVEN = 3 , CRIATOM_THREAD_MODEL_USER_MULTI = 1 , CRIATOM_THREAD_MODEL_SINGLE = 2 , CRIATOM_THREAD_MODEL_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF }
 Threading models. More...
 
enum  CriAtomSoundRendererTypeTag {
  CRIATOM_SOUND_RENDERER_NATIVE = 1 , CRIATOM_SOUND_RENDERER_ASR = 2 , CRIATOM_SOUND_RENDERER_EXTENDED = 3 , CRIATOM_SOUND_RENDERER_SPATIAL = 4 ,
  CRIATOM_SOUND_RENDERER_HW1 = (0 << 16) | CRIATOM_SOUND_RENDERER_NATIVE , CRIATOM_SOUND_RENDERER_HW2 = (1 << 16) | CRIATOM_SOUND_RENDERER_NATIVE , CRIATOM_SOUND_RENDERER_HW3 = (2 << 16) | CRIATOM_SOUND_RENDERER_NATIVE , CRIATOM_SOUND_RENDERER_HW4 = (3 << 16) | CRIATOM_SOUND_RENDERER_NATIVE ,
  CRIATOM_SOUND_RENDERER_FORCED_NATIVE = (15 << 16) | CRIATOM_SOUND_RENDERER_NATIVE , CRIATOM_SOUND_RENDERER_HAPTIC = (0 << 16) | CRIATOM_SOUND_RENDERER_EXTENDED , CRIATOM_SOUND_RENDERER_PSEUDO = (1 << 16) | CRIATOM_SOUND_RENDERER_EXTENDED , CRIATOM_SOUND_RENDERER_SPATIAL_CHANNELS = (0 << 16) | CRIATOM_SOUND_RENDERER_SPATIAL ,
  CRIATOM_SOUND_RENDERER_AMBISONICS = (1 << 16) | CRIATOM_SOUND_RENDERER_SPATIAL , CRIATOM_SOUND_RENDERER_PASSTHROUGH = (2 << 16) | CRIATOM_SOUND_RENDERER_SPATIAL , CRIATOM_SOUND_RENDERER_OBJECT = (3 << 16) | CRIATOM_SOUND_RENDERER_SPATIAL , CRIATOM_SOUND_RENDERER_ANY = 0 ,
  CRIATOM_SOUND_RENDERER_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF
}
 Sound renderer type. More...
 
enum  CriAtomSpeakerIdTag {
  CRIATOM_SPEAKER_FRONT_LEFT = 0 , CRIATOM_SPEAKER_FRONT_RIGHT = 1 , CRIATOM_SPEAKER_FRONT_CENTER = 2 , CRIATOM_SPEAKER_LOW_FREQUENCY = 3 ,
  CRIATOM_SPEAKER_SURROUND_LEFT = 4 , CRIATOM_SPEAKER_SURROUND_RIGHT = 5 , CRIATOM_SPEAKER_SURROUND_BACK_LEFT = 6 , CRIATOM_SPEAKER_SURROUND_BACK_RIGHT = 7 ,
  CRIATOM_SPEAKER_TOP_FRONT_LEFT = 8 , CRIATOM_SPEAKER_TOP_FRONT_RIGHT = 9 , CRIATOM_SPEAKER_TOP_BACK_LEFT = 10 , CRIATOM_SPEAKER_TOP_BACK_RIGHT = 11 ,
  CRIATOM_SPEAKER_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF
}
 Speaker ID. More...
 
enum  CriAtomEncodeQualityTag {
  CRIATOM_ENCODE_QUALITY_LOWEST = 0 , CRIATOM_ENCODE_QUALITY_LOW , CRIATOM_ENCODE_QUALITY_MIDDLE , CRIATOM_ENCODE_QUALITY_HIGH ,
  CRIATOM_ENCODE_QUALITY_HIGHEST , CRIATOM_ENCODE_QUALITY_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF
}
 Encoding quality. More...
 
enum  CriAtomPcmFormatTag
 PCM format. More...
 
enum  CriAtomVoiceStopReasonTag {
  CRIATOM_VOICE_STOP_REASON_EXPLAYER_STOP = 0 , CRIATOM_VOICE_STOP_REASON_EXPLAYER_STOPWITHOUTRELEASE , CRIATOM_VOICE_STOP_REASON_PLAYBACK_STOP , CRIATOM_VOICE_STOP_REASON_PLAYBACK_STOPWITHOUTRELEASE ,
  CRIATOM_VOICE_STOP_REASON_SOUNDPLAYER_DESTROY , CRIATOM_VOICE_STOP_REASON_FADER_STOP , CRIATOM_VOICE_STOP_REASON_PLAYER_STOP , CRIATOM_VOICE_STOP_REASON_AWB_STOP ,
  CRIATOM_VOICE_STOP_REASON_STREAMING_CACHE_STOP , CRIATOM_VOICE_STOP_REASON_PLAYER_FORCE_STOP , CRIATOM_VOICE_STOP_REASON_PLAYER_DESTROY , CRIATOM_VOICE_STOP_REASON_MTPLAYER_STOP ,
  CRIATOM_VOICE_STOP_REASON_VOICE_POOL_DESTROY , CRIATOM_VOICE_STOP_REASON_VOICE_STEAL_CASE1 , CRIATOM_VOICE_STOP_REASON_VOICE_STEAL_CASE2 , CRIATOM_VOICE_STOP_REASON_VOICE_STEAL_CASE3 ,
  CRIATOM_VOICE_STOP_REASON_VOICE_STEAL_CASE4 , CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_VIRTUAL_VOICE_BEYOND_LIFE_TIME , CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_CANT_CALC_3DPOS , CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_INTERNAL_PLAYBACK_CANCEL ,
  CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_NO_PLAYER_NO_RETRY , CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_FAILED_RETRY_BEYOND_LIFE_TIME , CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_PLAYER_STATUS_PLAYEND , CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_PLAYER_STATUS_ERROR ,
  CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_IMPOSSIBLE_RETRY , CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_PLAYER_STATUS_STOP , CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_INVALID_SERVER_REQUEST , CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_SILENT_MODE_STOP ,
  CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_SOUNDCOMPLEX_STATUS_ERROR , CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_NO_ELEMENT_CASE1 , CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_NO_ELEMENT_CASE2 , CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_STOP_NOT_PLAYING_ELEMENT ,
  CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_NOT_ACTIVE_VOICE , CRIATOM_VOICE_STOP_REASON_ELEMENT_FREE , CRIATOM_VOICE_STOP_REASON_EXPLAYER_STOP_ERROR_HN , CRIATOM_VOICE_STOP_REASON_ACB_RELEASE ,
  CRIATOM_VOICE_STOP_REASON_VOICE_ALLOCATE_FAIL , CRIATOM_VOICE_STOP_REASON_VOICE_RESET , CRIATOM_VOICE_STOP_REASON_VOICE_VIRTUALIZE , CRIATOM_VOICE_STOP_REASON_PLAYBACKSOUND_ALLOCATE_FAIL ,
  CRIATOM_VOICE_STOP_REASON_STOP_ACTION_WITH_BEATSYNC , CRIATOM_VOICE_STOP_REASON_START_CANCEL_WITH_BEATSYNC , CRIATOM_VOICE_STOP_REASON_STOP_ACTION , CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE0 ,
  CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE1 , CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE2 , CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE3 , CRIATOM_VOICE_STOP_REASON_CATEGORY_CUE_LIMIT ,
  CRIATOM_VOICE_STOP_REASON_UNSET_ACB , CRIATOM_VOICE_STOP_REASON_SEQUENCE_END , CRIATOM_VOICE_STOP_REASON_BLODK_END , CRIATOM_VOICE_STOP_REASON_SEQUENCE_EXECUTE ,
  CRIATOM_VOICE_STOP_REASON_TRACK_MONO , CRIATOM_VOICE_STOP_REASON_FADER_STOP_IMMEDIATE , CRIATOM_VOICE_STOP_REASON_CUE_LIMIT , CRIATOM_VOICE_STOP_REASON_STOP_ACB_____NOUSE ,
  CRIATOM_VOICE_STOP_REASON_SOUND_OBJECT_ADD_PLAYER , CRIATOM_VOICE_STOP_REASON_SOUND_OBJECT_DELETE_PLAYER , CRIATOM_VOICE_STOP_REASON_SOUND_OBJECT_DELETE_ALL_PLAYER , CRIATOM_VOICE_STOP_REASON_UNREGISTER_ACF ,
  CRIATOM_VOICE_STOP_REASON_EXPLAYER_DESTROY , CRIATOM_VOICE_STOP_REASON_EXPLAYER_ATTACH_FADER , CRIATOM_VOICE_STOP_REASON_EXPLAYER_DETACH_FADER , CRIATOM_VOICE_STOP_REASON_DETACH_AWB ,
  CRIATOM_VOICE_STOP_MULTIPLE_PLAYBACK_PROHIBITION_TIME , CRIATOM_VOICE_STOP_REASON_CATEGORY_STOP , CRIATOM_VOICE_STOP_REASON_CATEGORY_STOPWITHOUTRELEASE , CRIATOM_VOICE_STOP_REASON_NOTE_OFF ,
  CRIATOM_VOICE_STOP_REASON_REGISTER_ACF , CRIATOM_VOICE_STOP_REASON_STOP_ACTION_WITH_FADE , CRIATOM_VOICE_STOP_REASON_RESET_TRACK_PARAMETER , CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE4 ,
  CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE5 , CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE6 , CRIATOM_VOICE_STOP_REASON_NOTE_OFF2 , CRIATOM_VOICE_STOP_REASON_ALL_NOTE_OFF ,
  CRIATOM_VOICE_STOP_REASON_ALL_NOTE_OFF_WITHOUTRELEASE , CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_ENVELOPE_LEVEL_ZERO , CRIATOM_VOICE_STOP_REASON_AUX_IN_STOP , CRIATOM_VOICE_STOP_REASON_ACB_RELEASE_ASYNC ,
  CRIATOM_VOICE_STOP_REASON_INGAMEPREVIEW_PREPARE_OVERWRITE_ACF , CRIATOM_VOICE_STOP_REASON_INGAMEPREVIEW_PREPARE_OVERWRITE_ACB , CRIATOM_VOICE_STOP_REASON_CUE_LIMIT_RESUME_PREPARE , CRIATOM_VOICE_STOP_REASON_MIDI_PLAYER_NOTE_OFF ,
  CRIATOM_VOICE_STOP_REASON_VOICE_DROP_IN_OBA , CRIATOM_VOICE_STOP_REASON_NONE = 0x7FFFFFFE , CRIATOM_VOICE_STOP_REASON_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF
}
 Voice stop reason. More...
 
enum  CriAtomDeviceTypeTag {
  CRIATOM_DEVICE_TYPE_HDMI = 1 , CRIATOM_DEVICE_TYPE_HEADPHONE , CRIATOM_DEVICE_TYPE_BUILT_IN_SPEAKER , CRIATOM_DEVICE_TYPE_PAD_SPEAKER ,
  CRIATOM_DEVICE_TYPE_VIBRATION , CRIATOM_DEVICE_TYPE_UNKNOWN = 0 , CRIATOM_DEVICE_TYPE_UNAVAILABLE = -1 , CRIATOM_DEVICE_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF
}
 Device type. More...
 
enum  CriAtomSpeakerMappingTag {
  CRIATOM_SPEAKER_MAPPING_AUTO = 0 , CRIATOM_SPEAKER_MAPPING_MONO , CRIATOM_SPEAKER_MAPPING_STEREO , CRIATOM_SPEAKER_MAPPING_5_1 ,
  CRIATOM_SPEAKER_MAPPING_7_1 , CRIATOM_SPEAKER_MAPPING_5_1_2 , CRIATOM_SPEAKER_MAPPING_7_1_2 , CRIATOM_SPEAKER_MAPPING_7_1_4 ,
  CRIATOM_SPEAKER_MAPPING_AMBISONICS_1P , CRIATOM_SPEAKER_MAPPING_AMBISONICS_2P , CRIATOM_SPEAKER_MAPPING_AMBISONICS_3P , CRIATOM_SPEAKER_MAPPING_OBJECT ,
  CRIATOM_SPEAKER_MAPPING_CUSTOM , CRIATOM_SPEAKER_MAPPING_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF
}
 Speaker Mapping. More...
 
enum  CriAtomAmbisonicsOrderTypeTag { CRIATOMAMBISONICS_ORDER_TYPE_NONE = 0 , CRIATOMAMBISONICS_ORDER_TYPE_FIRST , CRIATOMAMBISONICS_ORDER_TYPE_1P = CRIATOMAMBISONICS_ORDER_TYPE_FIRST , CRIATOMAMBISONICS_ORDER_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF }
 Ambisonics Order (Discontinued) More...
 

Functions

const CriChar8 * criAtom_GetVersionString (void)
 Returns the version number and build information of the library. More...
 
CriSint32 criAtom_CalculateWorkSize (const CriAtomConfig *config)
 Calculate work area size required for initializing library. More...
 
void criAtom_Initialize (const CriAtomConfig *config, void *work, CriSint32 work_size)
 Initialize library. More...
 
void criAtom_Finalize (void)
 Finalize library. More...
 
CriBool criAtom_IsInitialized (void)
 Check library initialization status. More...
 
CriBool criAtom_IsAudioOutputActive (void)
 Checking whether the audio output is valid. More...
 
void criAtom_ExecuteMain (void)
 Execute server processing for multithreading. More...
 
void criAtom_ExecuteAudioProcess (void)
 Execute server processing for user multithreading. More...
 
void criAtom_SetUserMallocFunction (CriAtomMallocFunc func, void *obj)
 Register memory allocation function. More...
 
void criAtom_SetUserFreeFunction (CriAtomFreeFunc func, void *obj)
 Register memory deallocation function. More...
 
void criAtom_SetAudioFrameStartCallback (CriAtomAudioFrameStartCbFunc func, void *obj)
 Register start audio frame callback function. More...
 
void criAtom_SetAudioFrameEndCallback (CriAtomAudioFrameEndCbFunc func, void *obj)
 Register end audio frame callback function. More...
 
void criAtom_SetDeviceUpdateCallback (CriAtomDeviceUpdateCbFunc func, void *obj)
 Registering a device update notification. More...
 
void criAtom_Lock (void)
 Prevent server process interrupt. More...
 
void criAtom_Unlock (void)
 Allow server process interrupt. More...
 
void criAtom_ChangeDefaultChannelConfig (CriSint32 num_channels, CriAtomChannelConfig channel_config)
 Specify channel mapping pattern. More...
 
void criAtom_ChangeDefaultChannelOrder (CriSint32 num_channels, const CriSint32 *channel_order)
 Changed the default channel order. More...
 
void criAtom_SetAmbisonicsInputFormat (CriAtomAmbisonicsFormat format)
 Ambisonics audio format specification. More...
 
void criAtom_AttachPerformanceMonitor (void)
 Added performance monitor function. More...
 
void criAtom_DetachPerformanceMonitor (void)
 Delete performance monitor function. More...
 
void criAtom_ResetPerformanceMonitor (void)
 Reset performance monitor. More...
 
void criAtom_GetPerformanceInfo (CriAtomPerformanceInfo *info)
 Acquire performance information. More...
 
CriSint32 criAtom_CalculateAdxBitrate (CriSint32 num_channels, CriSint32 sampling_rate)
 Calculate bit rate of ADX data. More...
 
CriSint32 criAtom_CalculateHcaBitrate (CriSint32 num_channels, CriSint32 sampling_rate, CriAtomEncodeQuality quality)
 Calculate bit rate of HCA data. More...
 
CriSint32 criAtom_CalculateHcaMxBitrate (CriSint32 num_channels, CriSint32 sampling_rate, CriAtomEncodeQuality quality)
 Calculate bit rate of HCA-MX data. More...
 
CriBool criAtom_GetStreamingInfo (CriAtomStreamingInfo *streaming_info)
 Acquire streaming info. More...
 
CriBool criAtom_SetFreeTimeBufferingFlagForDefaultDevice (CriBool flag)
 Returns whether to load streaming during file I/O downtime. More...
 

Detailed Description

Macro Definition Documentation

◆ criAtom_SetDefaultConfig

#define criAtom_SetDefaultConfig (   p_config)
Value:
{\
(p_config)->thread_model = CRIATOM_THREAD_MODEL_MULTI;\
(p_config)->server_frequency = 60.0f;\
(p_config)->fs_config = NULL;\
(p_config)->context = NULL;\
(p_config)->version = CRI_ATOM_VERSION;\
(p_config)->version_string = CRI_ATOM_VER_NUM;\
(p_config)->max_players = 16;\
}
@ CRIATOM_THREAD_MODEL_MULTI
Multithreading.
Definition: cri_le_atom.h:528

Set default parameters for CriAtomConfig.

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

◆ criAtom_SetUserAllocator

#define criAtom_SetUserAllocator (   p_malloc_func,
  p_free_func,
  p_obj 
)
Value:
{\
criAtom_SetUserMallocFunction(p_malloc_func, p_obj);\
criAtom_SetUserFreeFunction(p_free_func, p_obj);\
}

Register user allocator.

Parameters
[in]p_malloc_funcmemory allocation function
[in]p_free_funcmemory deallocation function
[in]p_objuser specified object
Description:
Registers a memory allocator (memory allocation/deallocation function) with the CRI Atom library.
Once this macro registers an allocator, when the Atom library needs a work area, the user-registered memory allocation/deallocation processes are called.
Thus, it is possible to omit the process for setting a work area for each function (such as the criAtomPlayer_CreateAdxPlayer function) that requires a work area.
(Even if a NULL pointer is specified for the work area and 0 bytes is specified for the work area size, the library works without any problem due to dynamic memory allocation by the allocator.)
Note:
By specifying NULL for the pointer of the memory allocation/deallocation functions, the registration of the allocator can be canceled.
Note however that if the registration is canceled while a memory area is not deallocated, an error callback is returned and the cancellation of the registration will fail.
(The registered allocator is still called.)

This macro internally calls the criAtom_SetUserMallocFunction function and the criAtom_SetUserFreeFunction function.
Do not use this function together with these APIs.
(Calling this function overwrites the contents set for the above APIs.)

Also, the registered memory allocator may be called from multiple threads in multithreading mode. Therefore, if a memory allocation process is not thread-safe, it should implement its own exclusive access control.

Typedef Documentation

◆ CriAtomThreadModel

Threading models.

Description:
Represents threading models used when operating the CRI Atom library.
This is specified in the CriAtomConfig structure when the library is initialized (by using the criAtom_Initialize function).
See also
criAtom_Initialize, CriAtomConfig

◆ CriAtomConfig

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

◆ CriAtomMallocFunc

typedef void*( * CriAtomMallocFunc) (void *obj, CriUint32 size)

Memory allocation function.

Parameters
[in]objuser specified object
[in]sizerequested memory size (in bytes)
Returns
void* address of the allocated memory (NULL if failed)
Description:
Interface for registering a memory allocation function.
This function is used to replace a memory allocation process performed in the CRI Atom library with a user's own memory allocation process.
Remarks:
When a callback function is executed, the required memory size is set by the argument size.
The callback function must allocate a memory area with the size specified by size and return the address of the allocated memory.
The user-specified object registered by the criAtom_SetUserMallocFunction function is passed to the argument obj.
If it is necessary to refer to the memory manager and so on when a memory area is allocated, set the relevant object for the argument of the criAtom_SetUserMallocFunction function and refer to it through the argument of the callback function.
Attention
Note that if memory allocation fails, an error callback may be returned or the caller function may fail.
See also
CriAtomFreeFunc, criAtom_SetUserMallocFunction

◆ CriAtomFreeFunc

typedef void( * CriAtomFreeFunc) (void *obj, void *mem)

Memory deallocation function.

Parameters
[in]objuser specified object
[in]memaddress of the memory to be deallocated
Returns
None
Description:
Interface for registering a memory deallocation function.
This function is used to replace a memory deallocation process performed in the CRI Atom library with a user's own memory deallocation process.
Remarks:
When the callback function is executed, the address of the memory area to be deallocated is set for mem.
The callback function must deallocate the memory area specified by mem. The user-specified object registered by the criAtom_SetUserFreeFunction function is passed to the argument obj.
If it is necessary to refer to the memory manager and so on when a memory area is allocated, set the relevant object for the argument of the criAtom_SetUserFreeFunction function and refer to it through the argument of the callback function.
See also
CriAtomMallocFunc, criAtom_SetUserFreeFunction

◆ CriAtomAudioFrameStartCbFunc

typedef void( * CriAtomAudioFrameStartCbFunc) (void *obj)

Start audio frame callback function.

Parameters
[in]objuser specified object
Returns
None
Description:
Callback function executed when starting an audio frame.
An audio frame indicates the timing to start server process within a CRI Atom library.
Use the criAtom_SetAudioFrameStartCallback function to register the callback function.
The registered callback function is executed when starting an audio frame (just before starting the server process).
Remarks:
If the threading model is set to multithreading ( CRIATOM_THREAD_MODEL_MULTI ) at the initialization of the library, this callback function is called from the thread created in the CRI Atom library.
If the threading model is set to user multithreading ( CRIATOM_THREAD_MODEL_USER_MULTI ) or single threading ( CRIATOM_THREAD_MODEL_SINGLE ) at the initialization of the library, this callback function is called from the criAtom_ExecuteMain function.

Note that the user specified object registered with the criAtom_SetAudioFrameStartCallback function is passed to the argument obj.
See also
criAtom_SetAudioFrameStartCallback

◆ CriAtomAudioFrameEndCbFunc

typedef void( * CriAtomAudioFrameEndCbFunc) (void *obj)

End audio frame callback function.

Parameters
[in]objuser specified object
Returns
None
Description:
Callback function executed when ending an audio frame.
An audio frame indicates the timing to start server process within a CRI Atom library.
Use the criAtom_SetAudioFrameEndCallback function to register the callback function.
The registered callback function is executed when ending an audio frame (just after ending the server process).
Remarks:
If the threading model is set to multithreading ( CRIATOM_THREAD_MODEL_MULTI ) at the initialization of the library, this callback function is called from the thread created in the CRI Atom library.
If the threading model is set to user multithreading ( CRIATOM_THREAD_MODEL_USER_MULTI ) or single threading ( CRIATOM_THREAD_MODEL_SINGLE ) at the initialization of the library, this callback function is called from the criAtom_ExecuteMain function.

Note that the user specified object registered with the criAtom_SetAudioFrameEndCallback function is passed to the argument obj.
See also
criAtom_SetAudioFrameEndCallback

◆ CriAtomSoundRendererType

Sound renderer type.

Description:
Specifies the type of sound renderer internally created by the Atom player.
Specify as a parameter of the configuration structure when creating an Atom player.
Attention
CRIATOM_SOUND_RENDERER_ANY can only be specified for the criAtomExPlayer_SetSoundRendererType function.
It cannot be used for voice pool creation.
See also
CriAtomAdxPlayerConfig, criAtomPlayer_CreateAdxPlayer, criAtomExAsrRack_Create

◆ CriAtomSpeakerId

Speaker ID.

Description:
Specifies the speaker for outputting sound.
This is used in the criAtomPlayer_SetSendLevel function.
See also
criAtomPlayer_SetSendLevel

◆ CriAtomPerformanceInfo

Performance information.

Description:
Structure for acquiring performance information.
This is used in the criAtom_GetPerformanceInfo function.
See also
criAtom_GetPerformanceInfo

◆ CriAtomEncodeQuality

Encoding quality.

Description:
Data type of the encoding quality set by CRI Atom Encoder, CRI Atom Craft.
It is used when calculating the bit rate of sound data.
See also
criAtom_CalculateHcaBitrate, criAtom_CalculateHcaMxBitrate

◆ CriAtomFormat

typedef CriUint32 CriAtomFormat

Format type.

Description:
Indicates the sound data format.
Any of the following values can be used.
  • ::CRIATOM_FORMAT_ADX
  • ::CRIATOM_FORMAT_HCA
  • ::CRIATOM_FORMAT_HCA_MX
  • ::CRIATOM_FORMAT_WAVE
  • ::CRIATOM_FORMAT_RAW_PCM
  • ::CRIATOM_FORMAT_AIFF
  • ::CRIATOM_FORMAT_VIBRATION
  • ::CRIATOM_FORMAT_AUDIO_BUFFER
  • ::CRIATOM_FORMAT_HW1
  • ::CRIATOM_FORMAT_HW2

◆ CriAtomFormatInfo

Audio data format information.

Description:
Audio data format information.
This is used in the criAtomPlayer_GetFormatInfo function.
See also
criAtomPlayer_GetFormatInfo

◆ CriAtomPcmFormat

PCM format.

Description:
PCM data type information.
See also
criAtomPlayer_SetFilterCallback

◆ CriAtomStreamingInfo

Streaming information.

Description:
The streaming status at the point when the information was acquired by the criAtom_GetStreamingInfo function.
See also
criAtom_GetStreamingInfo

◆ CriAtomVoiceStopReason

Voice stop reason.

Description:
Indicates the reason for the voice stop.

◆ CriAtomDeviceUpdateCbFunc

typedef void( * CriAtomDeviceUpdateCbFunc) (void *obj)

Ambisonics order type.

Parameters
[in]objUser-specified object
Description:
The type of the callback function used for device update notifications.
By registering a callback function of this function type with the criAtom_SetDeviceUpdateCallback function, you can receive notifications when the device is updated.
See also
criAtom_SetDeviceUpdateCallback

◆ CriAtomDeviceType

Device type.

Description:
Displays the type of the device currently playing.
Calls the criAtomExAsrRack_GetDeviceType function to get the device type from the ASR rack.
Remarks:
Device types depend on the platform.
See also
criAtomExAsrRack_GetDeviceType

◆ CriAtomSpeakerMapping

Speaker Mapping.

Description:
Represents the speaker configuration.
See also
CriAtomExAsrConfig CriAtomExAsrRackConfig

◆ CriAtomAmbisonicsOrderType

Ambisonics Order (Discontinued)

Description:
Indicates the Ambisonics order type, now obsolete.

Enumeration Type Documentation

◆ CriAtomThreadModelTag

Threading models.

Description:
Represents threading models used when operating the CRI Atom library.
This is specified in the CriAtomConfig structure when the library is initialized (by using the criAtom_Initialize function).
See also
criAtom_Initialize, CriAtomConfig
Enumerator
CRIATOM_THREAD_MODEL_MULTI 

Multithreading.

Description:
The library creates threads internally, and works in multithreading mode.
The threads are created when the criAtom_Initialize function is called.
Library server processing is executed at a regular interval in the created threads.
CRIATOM_THREAD_MODEL_MULTI_USER_DRIVEN 

Multithreading (user-driven)

Description:
The library creates threads internally and works in multithreading mode.
The threads are created when the criAtom_Initialize function is called.
Server processing itself is executed in the created threads, but are not executed automatically like with CRIATOM_THREAD_MODEL_MULTI .
The user must explicitly call the criAtom_ExecuteMain function to execute the server processing.
(When the criAtom_ExecuteMain function is executed, the thread starts up and server processing is executed.)
CRIATOM_THREAD_MODEL_USER_MULTI 

User multithreading.

Description:
While the library does not create threads internally, it executes internal exclusive control so that server processing functions can be called from within user-created threads.
Server processing is executed synchronously in the criAtom_ExecuteMain function.
CRIATOM_THREAD_MODEL_SINGLE 

Single threading.

Description:
The library does not create threads internally, and does not execute internal exclusive control.
Server processing is executed synchronously in the criAtom_ExecuteMain function.
Attention
When using this model, call the APIs and server processing functions from within the same thread.

◆ CriAtomSoundRendererTypeTag

Sound renderer type.

Description:
Specifies the type of sound renderer internally created by the Atom player.
Specify as a parameter of the configuration structure when creating an Atom player.
Attention
CRIATOM_SOUND_RENDERER_ANY can only be specified for the criAtomExPlayer_SetSoundRendererType function.
It cannot be used for voice pool creation.
See also
CriAtomAdxPlayerConfig, criAtomPlayer_CreateAdxPlayer, criAtomExAsrRack_Create
Enumerator
CRIATOM_SOUND_RENDERER_NATIVE 

Output to platform library

CRIATOM_SOUND_RENDERER_ASR 

Output to Atom Sound Renderer

CRIATOM_SOUND_RENDERER_SPATIAL 

3D Sound Output

CRIATOM_SOUND_RENDERER_HW1 

Platform-specific definition1

CRIATOM_SOUND_RENDERER_HW2 

Platform-specific definition2

CRIATOM_SOUND_RENDERER_HW3 

Platform-specific definition3

CRIATOM_SOUND_RENDERER_HW4 

Platform-specific definition4

CRIATOM_SOUND_RENDERER_HAPTIC 

HAPTIX

CRIATOM_SOUND_RENDERER_PSEUDO 

PSEUDO

CRIATOM_SOUND_RENDERER_SPATIAL_CHANNELS 

Channel-based playback with spatializer

CRIATOM_SOUND_RENDERER_AMBISONICS 

Ambisonics playback

CRIATOM_SOUND_RENDERER_PASSTHROUGH 

Pass-Through Playback

CRIATOM_SOUND_RENDERER_OBJECT 

Object-Based Playback

CRIATOM_SOUND_RENDERER_ANY 

Do not restrict output method

◆ CriAtomSpeakerIdTag

Speaker ID.

Description:
Specifies the speaker for outputting sound.
This is used in the criAtomPlayer_SetSendLevel function.
See also
criAtomPlayer_SetSendLevel
Enumerator
CRIATOM_SPEAKER_FRONT_LEFT 

Front left speaker

CRIATOM_SPEAKER_FRONT_RIGHT 

Front right speaker

CRIATOM_SPEAKER_FRONT_CENTER 

Front center speaker

CRIATOM_SPEAKER_LOW_FREQUENCY 

LFE (~ sub woofer)

CRIATOM_SPEAKER_SURROUND_LEFT 

surround left speaker

CRIATOM_SPEAKER_SURROUND_RIGHT 

Surround right speaker

CRIATOM_SPEAKER_SURROUND_BACK_LEFT 

Surround back left speaker

CRIATOM_SPEAKER_SURROUND_BACK_RIGHT 

Surround back right speaker

CRIATOM_SPEAKER_TOP_FRONT_LEFT 

Top Front Left Speaker

CRIATOM_SPEAKER_TOP_FRONT_RIGHT 

Top Front Right Speaker

CRIATOM_SPEAKER_TOP_BACK_LEFT 

Top back left speaker

CRIATOM_SPEAKER_TOP_BACK_RIGHT 

Top Backlit Speaker

◆ CriAtomEncodeQualityTag

Encoding quality.

Description:
Data type of the encoding quality set by CRI Atom Encoder, CRI Atom Craft.
It is used when calculating the bit rate of sound data.
See also
criAtom_CalculateHcaBitrate, criAtom_CalculateHcaMxBitrate
Enumerator
CRIATOM_ENCODE_QUALITY_LOWEST 

minimum quality setting

CRIATOM_ENCODE_QUALITY_LOW 

low quality setting

CRIATOM_ENCODE_QUALITY_MIDDLE 

medium quality setting

CRIATOM_ENCODE_QUALITY_HIGH 

high quality setting

CRIATOM_ENCODE_QUALITY_HIGHEST 

maximum quality setting

◆ CriAtomPcmFormatTag

PCM format.

Description:
PCM data type information.
See also
criAtomPlayer_SetFilterCallback

◆ CriAtomVoiceStopReasonTag

Voice stop reason.

Description:
Indicates the reason for the voice stop.
Enumerator
CRIATOM_VOICE_STOP_REASON_EXPLAYER_STOP 

EX Player is stopped

CRIATOM_VOICE_STOP_REASON_EXPLAYER_STOPWITHOUTRELEASE 

EX player is stopped

CRIATOM_VOICE_STOP_REASON_PLAYBACK_STOP 

Playback is stopped by specifying an ID

CRIATOM_VOICE_STOP_REASON_PLAYBACK_STOPWITHOUTRELEASE 

Playback is immediately stopped by specifying a playback ID

CRIATOM_VOICE_STOP_REASON_SOUNDPLAYER_DESTROY 

Sound player is destroyed

CRIATOM_VOICE_STOP_REASON_FADER_STOP 

Fader is stopped

CRIATOM_VOICE_STOP_REASON_PLAYER_STOP 

Player is stopped

CRIATOM_VOICE_STOP_REASON_AWB_STOP 

AWB is stopped

CRIATOM_VOICE_STOP_REASON_STREAMING_CACHE_STOP 

Streaming cache is stopped

CRIATOM_VOICE_STOP_REASON_PLAYER_FORCE_STOP 

Player is stopped

CRIATOM_VOICE_STOP_REASON_PLAYER_DESTROY 

Player is destroyed

CRIATOM_VOICE_STOP_REASON_MTPLAYER_STOP 

MT player is destroyed

CRIATOM_VOICE_STOP_REASON_VOICE_POOL_DESTROY 

Voice pool is destroyed

CRIATOM_VOICE_STOP_REASON_VOICE_STEAL_CASE1 

Voice is stolen

CRIATOM_VOICE_STOP_REASON_VOICE_STEAL_CASE2 

Voice is stolen

CRIATOM_VOICE_STOP_REASON_VOICE_STEAL_CASE3 

Voice is stolen

CRIATOM_VOICE_STOP_REASON_VOICE_STEAL_CASE4 

Voice is stolen

CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_VIRTUAL_VOICE_BEYOND_LIFE_TIME 

Server processing

CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_CANT_CALC_3DPOS 

Server processing

CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_INTERNAL_PLAYBACK_CANCEL 

Server processing

CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_NO_PLAYER_NO_RETRY 

Server processing

CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_FAILED_RETRY_BEYOND_LIFE_TIME 

Server processing

CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_PLAYER_STATUS_PLAYEND 

Server processing

CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_PLAYER_STATUS_ERROR 

Server processing

CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_IMPOSSIBLE_RETRY 

Server processing

CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_PLAYER_STATUS_STOP 

Server processing

CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_INVALID_SERVER_REQUEST 

Server processing

CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_SILENT_MODE_STOP 

Server processing

CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_SOUNDCOMPLEX_STATUS_ERROR 

Server processing

CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_NO_ELEMENT_CASE1 

Server processing

CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_NO_ELEMENT_CASE2 

Server processing

CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_STOP_NOT_PLAYING_ELEMENT 

Server processing

CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_NOT_ACTIVE_VOICE 

Server processing

CRIATOM_VOICE_STOP_REASON_ELEMENT_FREE 

Element is released

CRIATOM_VOICE_STOP_REASON_EXPLAYER_STOP_ERROR_HN 

Player is stopped due to an error

CRIATOM_VOICE_STOP_REASON_ACB_RELEASE 

ACB is released

CRIATOM_VOICE_STOP_REASON_VOICE_ALLOCATE_FAIL 

Failed in allocating a voice

CRIATOM_VOICE_STOP_REASON_VOICE_RESET 

Voice is reset

CRIATOM_VOICE_STOP_REASON_VOICE_VIRTUALIZE 

Voice is virtualized

CRIATOM_VOICE_STOP_REASON_PLAYBACKSOUND_ALLOCATE_FAIL 

Failed in allocating playback sound

CRIATOM_VOICE_STOP_REASON_STOP_ACTION_WITH_BEATSYNC 

Beat sync stop action

CRIATOM_VOICE_STOP_REASON_START_CANCEL_WITH_BEATSYNC 

Beat sync playback cancel

CRIATOM_VOICE_STOP_REASON_STOP_ACTION 

Stop action

CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE0 

Block transition

CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE1 

Block transition

CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE2 

Block transition

CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE3 

Block transition

CRIATOM_VOICE_STOP_REASON_CATEGORY_CUE_LIMIT 

Category cue limit

CRIATOM_VOICE_STOP_REASON_UNSET_ACB 

ACB internally released

CRIATOM_VOICE_STOP_REASON_SEQUENCE_END 

Sequence end marker

CRIATOM_VOICE_STOP_REASON_BLODK_END 

Block end

CRIATOM_VOICE_STOP_REASON_SEQUENCE_EXECUTE 

Sequence server processing

CRIATOM_VOICE_STOP_REASON_TRACK_MONO 

Track mono-mode processing

CRIATOM_VOICE_STOP_REASON_FADER_STOP_IMMEDIATE 

Fader is immediately stopped

CRIATOM_VOICE_STOP_REASON_CUE_LIMIT 

Cue limit processing

CRIATOM_VOICE_STOP_REASON_STOP_ACB_____NOUSE 

All ACBs are stopped

CRIATOM_VOICE_STOP_REASON_SOUND_OBJECT_ADD_PLAYER 

Player is added to a sound object

CRIATOM_VOICE_STOP_REASON_SOUND_OBJECT_DELETE_PLAYER 

Player is deleted from a sound object

CRIATOM_VOICE_STOP_REASON_SOUND_OBJECT_DELETE_ALL_PLAYER 

Player is deleted from a sound object

CRIATOM_VOICE_STOP_REASON_UNREGISTER_ACF 

ACF is unregistered

CRIATOM_VOICE_STOP_REASON_EXPLAYER_DESTROY 

CriAtomExPlayer handle is destroyed

CRIATOM_VOICE_STOP_REASON_EXPLAYER_ATTACH_FADER 

Fader is added to CriAtomExPlayer

CRIATOM_VOICE_STOP_REASON_EXPLAYER_DETACH_FADER 

Fader is removed from CriAtomExPlayer

CRIATOM_VOICE_STOP_REASON_DETACH_AWB 

AWB is released

CRIATOM_VOICE_STOP_MULTIPLE_PLAYBACK_PROHIBITION_TIME 

Playback during multiple playback prohibition time

CRIATOM_VOICE_STOP_REASON_CATEGORY_STOP 

Category stop

CRIATOM_VOICE_STOP_REASON_CATEGORY_STOPWITHOUTRELEASE 

Category stop without release

CRIATOM_VOICE_STOP_REASON_NOTE_OFF 

Stop Timeline

CRIATOM_VOICE_STOP_REASON_REGISTER_ACF 

Register ACF

CRIATOM_VOICE_STOP_REASON_STOP_ACTION_WITH_FADE 

Stop Action with Fade

CRIATOM_VOICE_STOP_REASON_RESET_TRACK_PARAMETER 

Reset Track parameter

CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE4 

Block transition

CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE5 

Block transition

CRIATOM_VOICE_STOP_REASON_BLOCK_TRANSITION_CASE6 

Block transition

CRIATOM_VOICE_STOP_REASON_NOTE_OFF2 

Note off

CRIATOM_VOICE_STOP_REASON_ALL_NOTE_OFF 

ALL Note off

CRIATOM_VOICE_STOP_REASON_ALL_NOTE_OFF_WITHOUTRELEASE 

All Note off

CRIATOM_VOICE_STOP_REASON_SOUND_SERVER_RESULT_ENVELOPE_LEVEL_ZERO 

Server processing

CRIATOM_VOICE_STOP_REASON_ACB_RELEASE_ASYNC 

< Stop the external input
Asynchronous ACB release

CRIATOM_VOICE_STOP_REASON_INGAMEPREVIEW_PREPARE_OVERWRITE_ACF 

InGamePreview Before updating the ACF file

CRIATOM_VOICE_STOP_REASON_INGAMEPREVIEW_PREPARE_OVERWRITE_ACB 

InGamePreview Before updating the ACB file

CRIATOM_VOICE_STOP_REASON_CUE_LIMIT_RESUME_PREPARE 

Use Resume Cue Limit Processing

CRIATOM_VOICE_STOP_REASON_MIDI_PLAYER_NOTE_OFF 

MidiPlayer Note Off

CRIATOM_VOICE_STOP_REASON_VOICE_DROP_IN_OBA 

Server processing: Voice drop occurs when playing OBA

◆ CriAtomDeviceTypeTag

Device type.

Description:
Displays the type of the device currently playing.
Calls the criAtomExAsrRack_GetDeviceType function to get the device type from the ASR rack.
Remarks:
Device types depend on the platform.
See also
criAtomExAsrRack_GetDeviceType
Enumerator
CRIATOM_DEVICE_TYPE_HDMI 

HDMI

CRIATOM_DEVICE_TYPE_HEADPHONE 

Headphone

CRIATOM_DEVICE_TYPE_BUILT_IN_SPEAKER 

Built-in speaker

CRIATOM_DEVICE_TYPE_PAD_SPEAKER 

Gamepad speaker

CRIATOM_DEVICE_TYPE_VIBRATION 

Vibration

CRIATOM_DEVICE_TYPE_UNKNOWN 

Unknown device type

CRIATOM_DEVICE_TYPE_UNAVAILABLE 

No output device

◆ CriAtomSpeakerMappingTag

Speaker Mapping.

Description:
Represents the speaker configuration.
See also
CriAtomExAsrConfig CriAtomExAsrRackConfig
Enumerator
CRIATOM_SPEAKER_MAPPING_AUTO 

Auto

CRIATOM_SPEAKER_MAPPING_MONO 

1ch

CRIATOM_SPEAKER_MAPPING_STEREO 

2ch

CRIATOM_SPEAKER_MAPPING_5_1 

5.1ch

CRIATOM_SPEAKER_MAPPING_7_1 

7.1ch

CRIATOM_SPEAKER_MAPPING_5_1_2 

5.1.2ch

CRIATOM_SPEAKER_MAPPING_7_1_2 

7.1.2ch

CRIATOM_SPEAKER_MAPPING_7_1_4 

7.1.4ch

CRIATOM_SPEAKER_MAPPING_AMBISONICS_1P 

1st order Ambisonics

CRIATOM_SPEAKER_MAPPING_AMBISONICS_2P 

2nd order Ambisonics

CRIATOM_SPEAKER_MAPPING_AMBISONICS_3P 

3rd order Ambisonics

CRIATOM_SPEAKER_MAPPING_OBJECT 

Object-Based Playback

◆ CriAtomAmbisonicsOrderTypeTag

Ambisonics Order (Discontinued)

Description:
Indicates the Ambisonics order type, now obsolete.
Enumerator
CRIATOMAMBISONICS_ORDER_TYPE_NONE 

Not set

CRIATOMAMBISONICS_ORDER_TYPE_FIRST 

1st Order

CRIATOMAMBISONICS_ORDER_TYPE_1P 

1 Periphonic(Synonymous with 1st Order)

Function Documentation

◆ criAtom_GetVersionString()

const CriChar8* criAtom_GetVersionString ( void  )

Returns the version number and build information of the library.

Returns
const CriChar8* Library Information String
Description:
It shows the library version, build date and platform information.

◆ criAtom_CalculateWorkSize()

CriSint32 criAtom_CalculateWorkSize ( const CriAtomConfig config)

Calculate work area size required for initializing library.

Parameters
[in]configconfiguration structure for initialization
Returns
CriSint32 work area size
Return values
>=0 successfully completed
-1error occurred
Description:
Obtains the size of the work area required to use the CRI Atom library.

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 work area size required for the CRI Atom library varies depending on the content of the library initialization configuration structure ( CriAtomConfig ).

If you specify NULL as argument, the work area size is calculated using the default setting (i.e., the same parameters as when criAtom_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
CriAtomConfig, criAtom_Initialize

◆ criAtom_Initialize()

void criAtom_Initialize ( const CriAtomConfig config,
void *  work,
CriSint32  work_size 
)

Initialize library.

Parameters
[in]configconfiguration structure for initialization
[in]workwork area
[in]work_sizework area size
Description:
Initializes the CRI Atom 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 criAtom_Finalize function is executed.)

To initialize the library, you must allocate a memory area (work area) internally used by the library.
There are two methods to allocate the work area.
(a) User Allocator method: This method uses a user-prepared function to allocate/deallocate the memory.
(b) Fixed Memory method: This method passes a necessary memory area directly to the library.

When using the User Allocator method, the user must register a memory allocation function to the CRI Atom library.
By specifying NULL for work and 0 for work_size, and then calling this function, the library can use the registered memory allocation function to automatically allocate a necessary memory area.
The user does not need to prepare the work area.
The memory area allocated at initialization is released when the library is finalized (by executing the criAtom_Finalize function).

When using the Fixed Memory method, you must set a separately allocated memory for this function as work area.
The size of the work area can be obtained with the criAtom_CalculateWorkSize function.
Before initialization, allocate as much memory area as the size acquired by the criAtom_CalculateWorkSize function, and set the memory area for this function.
When the Fixed Memory method is used, the library uses the work area until the library is finalized (by the criAtom_Finalize function).
Do not release the memory area of the work area before the library is finalized.
Example:
[Initialization of the library by using the User Allocator method]
The following shows the procedure for initializing/finalizing the library when the User Allocator method is used.
  1. Before initialization, use the criAtom_SetUserMallocFunction function and criAtom_SetUserFreeFunction function to register the memory allocation/deallocation function.
  2. Set parameters for the configuration structure for initialization.
  3. Execute the criAtom_Initialize function to initialize the library.
    (Specify NULL for work and 0 for work_size.)
  4. When exiting an application, execute the criAtom_Finalize function to finalize the library.


The specific code is as follows:

// User's memory allocation function
void *user_malloc(void *obj, CriUint32 size)
{
void *mem;
// Allocate a memory
mem = malloc(size);
return (mem);
}
// Prepare user's memory release function
void user_free(void *obj, void *mem)
{
// Release memory
free(mem);
return;
}
main()
{
CriAtomConfig config; // Configuration structure for initializing the library
:
// User's memory allocation function
criAtom_SetUserMallocFunction(user_malloc, NULL);
// Register user's memory deallocation function
criAtom_SetUserFreeFunction(user_free, NULL);
// Set default values for a configuration structure for initializing the library
// Initialize the library
// Specify NULL and 0 for the work area.
// -> The required memory is allocated using the registered memory allocation function.
criAtom_Initialize(&config, NULL, 0);
:
// Application's main routine
:
// Finalize the library when exiting the application
// -> The memory allocated at initialization is released using the registered memory deallocation function.
:
}
#define criAtom_SetDefaultConfig(p_config)
Set default parameters for CriAtomConfig.
Definition: cri_le_atom.h:194
void criAtom_SetUserFreeFunction(CriAtomFreeFunc func, void *obj)
Register memory deallocation function.
void criAtom_Initialize(const CriAtomConfig *config, void *work, CriSint32 work_size)
Initialize library.
void criAtom_SetUserMallocFunction(CriAtomMallocFunc func, void *obj)
Register memory allocation function.
void criAtom_Finalize(void)
Finalize library.
Configuration structure for initializing library.
Definition: cri_le_atom.h:588


[Initialization of the library by using the Fixed Memory method]
The following shows the procedure for initializing/finalizing the library when the Fixed Memory method is used.

  1. Set parameters for the configuration structure for initialization.
  2. Use the criAtom_CalculateWorkSize function to calculate the size of the work area required for initializing the library.
  3. Allocate as much memory as the size of the work area.
  4. Execute the criAtom_Initialize function to initialize the library.
    (Specify the address of the allocated memory for work and the work area size for work_size.)
  5. When exiting an application, execute the criAtom_Finalize function to finalize the library.
  6. Release the memory of the work area.


The specific code is as follows:

main()
{
CriAtomConfig config; // Configuration structure for initializing the library
void *work; // Address of the work area
CriSint32 work_size; // Work area size
:
// Set default values for a configuration structure for initializing the library
// Calculate the size of the work area required for initializing the library
work_size = criAtom_CalculateWorkSize(&config);
// Allocate memory for the work area
work = malloc((size_t)work_size);
// Initialize the library
// -> Specify the allocated work area.
criAtom_Initialize(&config, NULL, 0);
:
// Application's main routine
// -> The allocated memory must be kept in the routine.
:
// Finalize the library when exiting the application
// Release work area no longer necessary.
free(work);
:
}
CriSint32 criAtom_CalculateWorkSize(const CriAtomConfig *config)
Calculate work area size required for initializing library.
Remarks:
The size of the work area needed for the library varies depending on the contents of the configuration structure for initialization.
In addition, the necessary work area size also depends on the platform.
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.
Attention
Currently, the CRI File System library must be initialized before the CRI Atom library regardless of whether streaming playback is performed.
If the CRI File System library has not been initialized, initialize the CRI File System library within the CRI Atom library.
In that case, the initialization parameter is the value set with the criFs_SetDefaultConfig process macro.
After executing this function, always execute the criAtom_Finalize function.
Also, this function cannot be executed again before executing the criAtom_Finalize function.
See also
CriAtomConfig, criAtom_Finalize, criAtom_SetUserMallocFunction, criAtom_SetUserFreeFunction, criAtom_CalculateWorkSize

◆ criAtom_Finalize()

void criAtom_Finalize ( void  )

Finalize library.

Description:
Finalizes the CRI Atom library.
Attention
This function cannot be executed before the criAtom_Initialize function is executed.
See also
criAtom_Initialize

◆ criAtom_IsInitialized()

CriBool criAtom_IsInitialized ( void  )

Check library initialization status.

Returns
CriBool whether to be initialized
Return values
CRI_FALSEuninitialized
CRI_TRUEinitialized
Description:
Checks whether the CRI Atom library is initialized or not.
See also
criAtom_Initialize, criAtom_Finalize

◆ criAtom_IsAudioOutputActive()

CriBool criAtom_IsAudioOutputActive ( void  )

Checking whether the audio output is valid.

Returns
CriBool Whether the audio output is valid
Return values
CRI_TRUEValid
CRI_FALSEInvalid
Description:
Checks whether the audio output is valid.
If the sound device is available when the CRI Atom library is initialized, this function returns CRI_TRUE.
If the sound device is unavailable when the CRI Atom library is initialized, this function returns CRI_FALSE.
Additional information:
Even if the sound device is invalid, the Atom works without outputting sounds.
(It calculates how much sound data is consumed based on the timer, and emulates the same behavior as when sound output is valid as much as possible.)
Therefore, even when the sound output device is unavailable, the application does not need to avoid calling APIs in the Atom library.
(If you want to notify the user that the sound device is invalid in a PC environment, use this function.)
Attention
This function returns a value to show whether the audio device was available or not when the Atom library was initialized.
This function cannot detect that the user has installed or removed the sound device after the library is initialized.
(You must use a device-specific API.)

If the Atom library is initialized when the audio output is invalid and then the user enables the audio device, the Atom library does not output sounds.
(The Atom library does not automatically detect that an audio device is installed.)
To enable the audio device while the application is running, you must initialize the Atom library again.
See also
criAtom_Initialize

◆ criAtom_ExecuteMain()

void criAtom_ExecuteMain ( void  )

Execute server processing for multithreading.

Description:
Updates the internal state of the CRI Atom library.
The application must execute this function regularly.

The number of times the sever process must be executed depends on the parameters specified during library initialization.
If the threading model is set to CRIATOM_THREAD_MODEL_MULTI at the initialization of the library, all processes that must be executed in real-time are executed regularly and automatically in the CRI Atom library. And therefore, even if the call frequency of this function is small, no problem occurs.
(If this function is executed at least once per second, problems such as interruption of playback will not occur.)
When the library is initialized, if the threading model is set to CRIATOM_THREAD_MODEL_SINGLE or CRIATOM_THREAD_MODEL_USER_MULTI , this function performs almost all processes required for audio playback, such as file-reading management, data decoding, and audio output.
Also, this function performs file accesses and data expansion processes for the CRI File System library synchronizing with audio playback.
Note, therefore, that if this function is executed less frequently than the execution frequency of server processing (server_frequency in the CriAtomConfig structure) specified when the library is initialized, or if a large data or compressed file is read, problems such as interruption of playback may occur.
Remarks:
Also when the threading model is set to CRIATOM_THREAD_MODEL_MULTI at the initialization of the library, this function must be executed.
(If the threading model is set to CRIATOM_THREAD_MODEL_MULTI , only some processes such as status update are
Server processing of the CRI File System library is executed in the CRI Atom library.
, Therefore, if this function has been executed, the application does not need to call server processing of the CRI File System library.
See also
criAtom_ExecuteAudioProcess

◆ criAtom_ExecuteAudioProcess()

void criAtom_ExecuteAudioProcess ( void  )

Execute server processing for user multithreading.

Description:
Updates only the CRI Atom library.
When the threading model is CRIATOM_THREAD_MODEL_USER_MULTI , the application must execute this function regularly.


This function performs almost all processes required for audio playback, such as file-reading management, data decoding, and audio output.
Note, therefore, that if this function is executed less frequently than the execution frequency of server processing (server_frequency in the CriAtomConfig structure), problems such as interruption of playback may occur.
In addition, unlike the criAtom_ExecuteMain function, this function does not execute server processing of the CRI File System library.
The application must execute necessary server processing in a correct order.

Remarks:
When CRIATOM_THREAD_MODEL_SINGLE is selected, exclusive control for server processing is not performed, and therefore, do not call this function from multiple threads.
See also
criAtom_ExecuteMain

◆ criAtom_SetUserMallocFunction()

void criAtom_SetUserMallocFunction ( CriAtomMallocFunc  func,
void *  obj 
)

Register memory allocation function.

Parameters
[in]funcmemory allocation function
[in]objuser specified object
Description:
Registers a memory allocation function with the CRI Atom library.
It is used when replacing the memory allocation process performed within the CRI Atom library with user's memory allocation process.

This function is used as follows:
(1) Prepare a memory allocation function compliant with the CriAtomMallocFunc interface.
(2) Use the criAtom_SetUserMallocFunction function to register the memory allocation function with the CRI Atom library.

The specific coding example is as follows:
Example:
// Prepare user's memory allocation function
void *user_malloc(void *obj, CriUint32 size)
{
void *mem;
// Allocate a memory
mem = malloc(size);
return (mem);
}
main()
{
:
// Register memory allocation function
criAtom_SetUserMallocFunction(user_malloc, NULL);
:
}
Remarks:
The value specified in argument obj is passed to CriAtomMallocFunc as argument.
If you need to access the memory manager during memory allocation, set the relevant object as the argument for this function and access through the argument from the callback function.
Attention
You must also register the memory deallocation function (CriAtomFreeFunc ) when registering the memory allocation function.
See also
CriAtomMallocFunc, criAtom_SetUserFreeFunction

◆ criAtom_SetUserFreeFunction()

void criAtom_SetUserFreeFunction ( CriAtomFreeFunc  func,
void *  obj 
)

Register memory deallocation function.

Parameters
[in]funcmemory deallocation function
[in]objuser specified object
Description:
Registers a memory deallocation function with the CRI Atom library.
It is used when replacing the memory deallocation process performed within the CRI Atom library with user's memory deallocation process.

This function is used as follows:
(1) Supply memory deallocation function complying with the CriAtomFreeFunc interface.
(2) Use the criAtom_SetUserFreeFunction function to register the memory deallocation function in the CRI Atom library.

The specific coding example is as follows:
Example:
// Prepare user's memory release function
void user_free(void *obj, void *mem)
{
// Release memory
free(mem);
return;
}
main()
{
:
// Register memory deallocation function
criAtom_SetUserFreeFunction(user_free, NULL);
:
}
Remarks:
The value specified in argument obj is passed to CriAtomFreeFunc as argument.
If you need to access the memory manager during memory allocation, set the relevant object as the argument for this function and access through the argument from the callback function.
Attention
You must also register the memory allocation function ( CriAtomMallocFunc ) when registering the memory deallocation function.
See also
CriAtomFreeFunc, criAtom_SetUserMallocFunction

◆ criAtom_SetAudioFrameStartCallback()

void criAtom_SetAudioFrameStartCallback ( CriAtomAudioFrameStartCbFunc  func,
void *  obj 
)

Register start audio frame callback function.

Parameters
[in]funcstart audio frame callback function
[in]objuser specified object
Description:
Registers the start audio frame callback with the CRI Atom library.
An audio frame indicates the timing to start server process within a CRI Atom library.
The callback function registered with this function is executed when starting an audio frame (just before starting the server process).
Remarks:
If the threading model is set to multithreading ( CRIATOM_THREAD_MODEL_MULTI ) at the initialization of the library, the callback function is called from the thread created in the CRI Atom library.
If the threading model is set to user multithreading ( CRIATOM_THREAD_MODEL_USER_MULTI ) or single threading ( CRIATOM_THREAD_MODEL_SINGLE ) at the initialization of the library, the callback function is called from the criAtom_ExecuteMain function.

The value specified for the argument obj is passed as an argument to CriAtomAudioFrameStartCbFunc .
Attention
Only one callback function can be registered.
If you perform the registration operation multiple times, the callback function that has already been registered will be overwritten by the callback function registered later.

The value specified in argument obj is passed to CriAtomAudioFrameStartCbFunc as argument.

◆ criAtom_SetAudioFrameEndCallback()

void criAtom_SetAudioFrameEndCallback ( CriAtomAudioFrameEndCbFunc  func,
void *  obj 
)

Register end audio frame callback function.

Parameters
[in]funcend audio frame callback function
[in]objuser specified object
Description:
Registers the end audio frame callback with the CRI Atom library.
An audio frame indicates the timing to start server process within a CRI Atom library.
The callback function registered with this function is executed when ending an audio frame (just after ending the server process).
Remarks:
If the threading model is set to multithreading ( CRIATOM_THREAD_MODEL_MULTI ) at the initialization of the library, the callback function is called from the thread created in the CRI Atom library.
If the threading model is set to user multithreading ( CRIATOM_THREAD_MODEL_USER_MULTI ) or single threading ( CRIATOM_THREAD_MODEL_SINGLE ) at the initialization of the library, the callback function is called from the criAtom_ExecuteMain function.

The value specified in the argument obj will be passed to CriAtomAudioFrameEndCbFunc as an argument.
Attention
Only one callback function can be registered.
If you register more than once, the already registered callback function will be overwritten by the callback function you registered later.

The value specified in argument obj is passed to CriAtomAudioFrameEndCbFunc as argument.

◆ criAtom_SetDeviceUpdateCallback()

void criAtom_SetDeviceUpdateCallback ( CriAtomDeviceUpdateCbFunc  func,
void *  obj 
)

Registering a device update notification.

Parameters
[in]callbackDevice update notification callback function
[in]objUser-specified object
Description:
Sets the callback to receive device update notifications.

Once this function is executed, the callback passed as the first argument will be called each time the device is updated.
Remarks:
The value of the second argument ( object ) will be passed to the callback function.

◆ criAtom_Lock()

void criAtom_Lock ( void  )

Prevent server process interrupt.

Description:
Suppresses server process interrupt.
After executing this function, server process operation is suppressed until the criAtom_Unlock function is executed.
In order to ensure execution of multiple APIs within the same audio frame, suppress server process interrupt with this function and execute those functions.
Example:
// Prevent server process interrupt
// Start playback of multiple sounds simultaneously
// Allow server process interrupt
void criAtom_Unlock(void)
Allow server process interrupt.
void criAtom_Lock(void)
Prevent server process interrupt.
void criAtomPlayer_Start(CriAtomPlayerHn player)
Start playback.
Attention
Even when starting playback simultaneously with multiple players as in the above example, sound output may not start simultaneously during stream playback.
(Due to playback latency caused by buffering.)

After executing this function, playback may be interrupted if the criAtom_Unlock function is not called for a long time.
The interval to prevent server process interrupt must be kept to a minimum.
See also
criAtom_Unlock

◆ criAtom_Unlock()

void criAtom_Unlock ( void  )

Allow server process interrupt.

Description:
Allows server process interrupt prevented by the criAtom_Lock function.
See also
criAtom_Lock

◆ criAtom_ChangeDefaultChannelConfig()

void criAtom_ChangeDefaultChannelConfig ( CriSint32  num_channels,
CriAtomChannelConfig  channel_config 
)

Specify channel mapping pattern.

Parameters
[in]num_channelsNumber of Channels
[in]channel_configChannel Config
Description:
Changes the correspondence between each audio data channel and the output speaker.
By default, the Atom library assumes that the audio data has the following channel configuration:
Number of Channels Assumed channel configuration
1 CRIATOM_CHANNEL_CONFIG_MONO
2 CRIATOM_CHANNEL_CONFIG_STEREO
3 CRIATOM_CHANNEL_CONFIG_3_LRC
4 CRIATOM_CHANNEL_CONFIG_QUAD
5 CRIATOM_CHANNEL_CONFIG_5
6 CRIATOM_CHANNEL_CONFIG_5_1
7 CRIATOM_CHANNEL_CONFIG_6_1
8 CRIATOM_CHANNEL_CONFIG_7_1
9 CRIATOM_CHANNEL_CONFIG_AMBISONICS_2P
10 CRIATOM_CHANNEL_CONFIG_7_1_2
12 CRIATOM_CHANNEL_CONFIG_7_1_4
16 CRIATOM_CHANNEL_CONFIG_AMBISONICS_3P
If the channel configuration of the audio data to be played is different from the above, you must use this function to change the channel configuration.
For example, if you want to treat 8ch audio as 5.1.2ch, you need to change the channel configuration with code like the following:
// Instructs 8ch audio to be treated as 5.1.2ch audio
criAtom_ChangeDefaultChannelConfig(8, CRIATOM_CHANNEL_CONFIG_5_1_2);
void criAtom_ChangeDefaultChannelConfig(CriSint32 num_channels, CriAtomChannelConfig channel_config)
Specify channel mapping pattern.
Attention
The configuration change only affects the audio data of the channel specified in the first argument (num_channels).
Therefore, if audio data with different numbers of channels is mixed, you will need to change the channel configuration for each number of channels.
For example, if you want to change the channel configuration for both 4ch audio and 8ch audio, you will need to specify two channel configurations: one where num_channels is 4 and one where it is 8.
// Change the channel configuration of 4ch audio
criAtom_ChangeDefaultChannelConfig(4, CRIATOM_CHANNEL_CONFIG_AMBISONICS_1P);
// Change the channel configuration of 8ch audio
criAtom_ChangeDefaultChannelConfig(8, CRIATOM_CHANNEL_CONFIG_5_1_2);
The timing at which the audio being played refers to the default value depends on the user's operation.
Therefore, if you change the default value during playback, the change may not be reflected at the intended timing.
If you use this function, execute it before playing the audio, such as during initialization.

◆ criAtom_ChangeDefaultChannelOrder()

void criAtom_ChangeDefaultChannelOrder ( CriSint32  num_channels,
const CriSint32 *  channel_order 
)

Changed the default channel order.

Parameters
[in]num_channelsNumber of Channels
[in]channel_orderChannel Order
Description:
Changes the channel loading order for audio data with the specified number of channels.
By default, the Atom library assumes that audio data is interleaved in the following channel order:
Channel Number Possible channels
0 Left
1 Right
2 Center
3 LFE
4 Surround Left
5 Surround right
6 Surround back left
7 Surround back right
8 Top front left
9 Top front right
10 Top back left
11 Top back right
If the order of the audio data to be played is different from the above, you must use this function to change the order in which the channels are read.
  • For example, if you are using 7.1ch audio data in which the surround back components of the input audio precede the surround components (audio data in which channels 4 and 5 are swapped with channels 6 and 7), you will need to specify the channel order using code like the following:
    // Regarding 8ch audio, it has been clarified that the surround and
    // surround back components are interleaved in the reverse order to that assumed by the library.
    CriSint32 channel_order[] = { 0, 1, 2, 3, 6, 7, 4, 5 };
    void criAtom_ChangeDefaultChannelOrder(CriSint32 num_channels, const CriSint32 *channel_order)
    Changed the default channel order.
Note:
Mono audio is interpreted as the center channel.
However, by default, the sound is output from the left and right speakers, which is known as the phantom center.
(To output mono audio from the center speaker, you must change the pan speaker type.)

5.1.2ch audio data is interpreted as the following channel order by default:
Channel Number Possible channels
0 Left
1 Right
2 Center
3 LFE
4 Surround Left
5 Surround right
6 Top left
7 Top right
Attention
Changing the order only affects the audio data of the channels specified in the first argument (num_channels).
Therefore, if audio data with different numbers of channels is mixed, the channel order must be changed for each number of channels.
For example, if you want to change the channel order for both 7.1ch audio and 7.1.4ch audio, you will need to specify two channel order patterns: one where num_channels is 8 and one where it is 12.
// Change the channel order of 8ch audio
CriSint32 channel_order_for_8ch[8] = { … };
criAtom_ChangeDefaultChannelOrder(8, channel_order_for_8ch);
// Change the channel order of 12ch audio
CriSint32 channel_order_for_12ch[12] = { … };
criAtom_ChangeDefaultChannelOrder(12, channel_order_for_12ch);
The timing at which the audio being played refers to the default value depends on the user's operation.
Therefore, if you change the default value during playback, the change may not be reflected at the intended timing.
If you use this function, execute it before playing the audio, such as during initialization.

◆ criAtom_SetAmbisonicsInputFormat()

void criAtom_SetAmbisonicsInputFormat ( CriAtomAmbisonicsFormat  format)

Ambisonics audio format specification.

Parameters
[in]formatformat
Description:
Specifies the channel order and normalization method for Ambisonics audio data.
The default format is CRIATOM_AMBISONICS_ACN_SN3D .

◆ criAtom_AttachPerformanceMonitor()

void criAtom_AttachPerformanceMonitor ( void  )

Added performance monitor function.

Description:
Adds a performance measurement function and starts the performance measurement process.
After executing this function, you can execute the criAtom_GetPerformanceInfo function to obtain library performance information, such as the server processing load and the execution interval of the server processing.
See also
criAtom_GetPerformanceInfo, criAtom_DetachPerformanceMonitor
Example:
// Structure for acquiring performance information
// Initialize the library
// Add the performance monitor function
// Reset the performance monitor
// Performance measurement interval
// Acquire performance information
// Display the measurement results
printf(
"Max CPU Load : %d (us)\n" \
"Average CPU Load : %d (us)\n" \
"Max Server Interval : %d (us)\n" \
"Average Server Interval : %d (us)\n",
);
void criAtom_ResetPerformanceMonitor(void)
Reset performance monitor.
void criAtom_AttachPerformanceMonitor(void)
Added performance monitor function.
void criAtom_GetPerformanceInfo(CriAtomPerformanceInfo *info)
Acquire performance information.
Performance information.
Definition: cri_le_atom.h:872
CriUint32 max_server_time
Definition: cri_le_atom.h:875
CriUint32 max_server_interval
Definition: cri_le_atom.h:878
CriUint32 average_server_time
Definition: cri_le_atom.h:876
CriUint32 average_server_interval
Definition: cri_le_atom.h:879

◆ criAtom_DetachPerformanceMonitor()

void criAtom_DetachPerformanceMonitor ( void  )

Delete performance monitor function.

Description:
Stops a performance measuring process and deletes the performance measuring 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.

◆ criAtom_ResetPerformanceMonitor()

void criAtom_ResetPerformanceMonitor ( void  )

Reset performance monitor.

Description:
Discards all preceding measurement results.
A performance monitor starts to acquire performance information immediately after the criAtom_AttachPerformanceMonitor function is executed, and accumulates the measurement results.
If you do not want to mix past and subsequent measurement results, execute this function to discard the accumulated measurement results.

◆ criAtom_GetPerformanceInfo()

void criAtom_GetPerformanceInfo ( CriAtomPerformanceInfo info)

Acquire performance information.

Description:
Acquires performance information.
This function is available after the criAtom_AttachPerformanceMonitor function is executed, before the criAtom_DetachPerformanceMonitor function is executed.
See also
criAtom_AttachPerformanceMonitor, criAtom_DetachPerformanceMonitor

◆ criAtom_CalculateAdxBitrate()

CriSint32 criAtom_CalculateAdxBitrate ( CriSint32  num_channels,
CriSint32  sampling_rate 
)

Calculate bit rate of ADX data.

Parameters
[in]num_channelsnumber of channels in the data
[in]sampling_ratesampling rate of the data
Returns
CriSint32 bit rate [bps]
Description:
Calculates the bit rate of an ADX data.
If this function fails to calculate the bit rate, it returns -1.
To know the reason of the failure in the calculation, check the error callback message.

◆ criAtom_CalculateHcaBitrate()

CriSint32 criAtom_CalculateHcaBitrate ( CriSint32  num_channels,
CriSint32  sampling_rate,
CriAtomEncodeQuality  quality 
)

Calculate bit rate of HCA data.

Parameters
[in]num_channelsnumber of channels in the data
[in]sampling_ratesampling rate of the data
[in]qualityencode quality of the data
Returns
CriSint32 bit rate [bps]
Description:
Calculates the bit rate of an HCA data.
If this function fails to calculate the bit rate, it returns -1.
To know the reason of the failure in the calculation, check the error callback message.
Remarks:
For quality, specify the encode quality set by CRI Atom Craft or CRI Atom Encoder.

◆ criAtom_CalculateHcaMxBitrate()

CriSint32 criAtom_CalculateHcaMxBitrate ( CriSint32  num_channels,
CriSint32  sampling_rate,
CriAtomEncodeQuality  quality 
)

Calculate bit rate of HCA-MX data.

Parameters
[in]num_channelsnumber of channels in the data
[in]sampling_ratesampling rate of the data
[in]qualityencode quality of the data
Returns
CriSint32 bit rate [bps]
Description:
Calculates the bit rate of an HCA-MX data.
If this function fails to calculate the bit rate, it returns -1.
To know the reason of the failure in the calculation, check the error callback message.
Remarks:
For quality, specify the encode quality set by CRI Atom Craft or CRI Atom Encoder.

◆ criAtom_GetStreamingInfo()

CriBool criAtom_GetStreamingInfo ( CriAtomStreamingInfo streaming_info)

Acquire streaming info.

Parameters
[out]streaming_infoPointer to location to save streaming information
Return values
CRI_TRUEValues were acquired
CRI_FALSEValues were not acquired
Description:
Acquires streaming information from the CRI Atom library's streaming management module.
This function saves the streaming information at the time the function was called to streaming_info.
Attention
Note that some exclusive control is performed with the Atom server internal processing, so be sure not to stop the Atom server due to reversed priorities.
Streaming information cannot be acquired on some platforms.
Check the return value of this function to determine if the information was acquired.
To determine if the streaming information could not be acquired due to an error,
check if the error callback has been triggered.
See also
CriAtomStreamingInfo

◆ criAtom_SetFreeTimeBufferingFlagForDefaultDevice()

CriBool criAtom_SetFreeTimeBufferingFlagForDefaultDevice ( CriBool  flag)

Returns whether to load streaming during file I/O downtime.

Parameters
[in]flagCRI_TRUE = Use downtime during file I/O for loading
Return values
CRI_TRUEProcess completed normally.
CRI_FALSEAn error occurred.
Description:
This sets whether or not to load streaming data during downtime between file I/O operations
via the streaming management module of the CRI Atom library.
If CRI_TRUE is set, the CRI Atom library's streaming management module will use any downtime between file I/O operations to load extra data into empty buffer space.
If CRI_FALSE is set, the CRI Atom library's streaming management module will not use the downtime between file I/O operations to load extra data into empty buffer space.
The default setting is CRI_TRUE.
Remarks:
By utilizing the downtime between file I/O operations to load extra data into empty buffer space, the frequency of seeking can be reduced and overall file I/O efficiency will be improved.
On the other hand, normal file loading has lower priority that loading performed for streaming, so if the empty buffer is too large, normal file loading will be delayed significantly.
Attention
Some internal Atom server processing is performed under exclusive control, so be sure not to stop the Atom server due to priority inversion.