CRI ADX
Last Updated: 2024-07-17 10:48 p
|
结构体 | |
struct | CriAtomConfigTag |
Configuration structure for initializing library 更多... | |
struct | CriAtomPerformanceInfoTag |
Performance information 更多... | |
struct | CriAtomFormatInfoTag |
Audio data format information 更多... | |
struct | CriAtomStreamingInfoTag |
Streaming information 更多... | |
宏定义 | |
#define | criAtom_SetDefaultConfig(p_config) |
Set default parameters for CriAtomConfig 更多... | |
#define | criAtom_SetUserAllocator(p_malloc_func, p_free_func, p_obj) |
Register user allocator 更多... | |
类型定义 | |
typedef enum CriAtomThreadModelTag | CriAtomThreadModel |
Threading models 更多... | |
typedef struct CriAtomConfigTag | CriAtomConfig |
Configuration structure for initializing library 更多... | |
typedef void *(* | CriAtomMallocFunc) (void *obj, CriUint32 size) |
Memory allocation function 更多... | |
typedef void(* | CriAtomFreeFunc) (void *obj, void *mem) |
Memory deallocation function 更多... | |
typedef void(* | CriAtomAudioFrameStartCbFunc) (void *obj) |
Start audio frame callback function 更多... | |
typedef void(* | CriAtomAudioFrameEndCbFunc) (void *obj) |
End audio frame callback function 更多... | |
typedef enum CriAtomSoundRendererTypeTag | CriAtomSoundRendererType |
Sound renderer type 更多... | |
typedef enum CriAtomSpeakerIdTag | CriAtomSpeakerId |
Speaker ID 更多... | |
typedef struct CriAtomPerformanceInfoTag | CriAtomPerformanceInfo |
Performance information 更多... | |
typedef enum CriAtomEncodeQualityTag | CriAtomEncodeQuality |
Encoding quality 更多... | |
typedef CriUint32 | CriAtomFormat |
Format type 更多... | |
typedef struct CriAtomFormatInfoTag | CriAtomFormatInfo |
Audio data format information 更多... | |
typedef enum CriAtomPcmFormatTag | CriAtomPcmFormat |
PCM format 更多... | |
typedef struct CriAtomStreamingInfoTag | CriAtomStreamingInfo |
Streaming information 更多... | |
typedef enum CriAtomVoiceStopReasonTag | CriAtomVoiceStopReason |
Voice stop reason 更多... | |
typedef void(* | CriAtomDeviceUpdateCbFunc) (void *obj) |
Ambisonics order type 更多... | |
typedef enum CriAtomDeviceTypeTag | CriAtomDeviceType |
Device type 更多... | |
typedef enum CriAtomSpeakerMappingTag | CriAtomSpeakerMapping |
Speaker Mapping 更多... | |
typedef enum CriAtomAmbisonicsOrderTypeTag | CriAtomAmbisonicsOrderType |
Ambisonics Order (Discontinued) 更多... | |
函数 | |
const CriChar8 * | criAtom_GetVersionString (void) |
Returns the version number and build information of the library. 更多... | |
CriSint32 | criAtom_CalculateWorkSize (const CriAtomConfig *config) |
Calculate work area size required for initializing library 更多... | |
void | criAtom_Initialize (const CriAtomConfig *config, void *work, CriSint32 work_size) |
Initialize library 更多... | |
void | criAtom_Finalize (void) |
Finalize library 更多... | |
CriBool | criAtom_IsInitialized (void) |
Check library initialization status 更多... | |
CriBool | criAtom_IsAudioOutputActive (void) |
Checking whether the audio output is valid 更多... | |
void | criAtom_ExecuteMain (void) |
Execute server processing for multithreading. 更多... | |
void | criAtom_ExecuteAudioProcess (void) |
Execute server processing for user multithreading. 更多... | |
void | criAtom_SetUserMallocFunction (CriAtomMallocFunc func, void *obj) |
Register memory allocation function 更多... | |
void | criAtom_SetUserFreeFunction (CriAtomFreeFunc func, void *obj) |
Register memory deallocation function 更多... | |
void | criAtom_SetAudioFrameStartCallback (CriAtomAudioFrameStartCbFunc func, void *obj) |
Register start audio frame callback function 更多... | |
void | criAtom_SetAudioFrameEndCallback (CriAtomAudioFrameEndCbFunc func, void *obj) |
Register end audio frame callback function 更多... | |
void | criAtom_SetDeviceUpdateCallback (CriAtomDeviceUpdateCbFunc func, void *obj) |
Registering a device update notification 更多... | |
void | criAtom_Lock (void) |
Prevent server process interrupt 更多... | |
void | criAtom_Unlock (void) |
Allow server process interrupt 更多... | |
void | criAtom_ChangeDefaultChannelConfig (CriSint32 num_channels, CriAtomChannelConfig channel_config) |
Specify channel mapping pattern 更多... | |
void | criAtom_ChangeDefaultChannelOrder (CriSint32 num_channels, const CriSint32 *channel_order) |
Changed the default channel order 更多... | |
void | criAtom_SetAmbisonicsInputFormat (CriAtomAmbisonicsFormat format) |
Ambisonics audio format specification 更多... | |
void | criAtom_AttachPerformanceMonitor (void) |
Added performance monitor function 更多... | |
void | criAtom_DetachPerformanceMonitor (void) |
Delete performance monitor function 更多... | |
void | criAtom_ResetPerformanceMonitor (void) |
Reset performance monitor 更多... | |
void | criAtom_GetPerformanceInfo (CriAtomPerformanceInfo *info) |
Acquire performance information 更多... | |
CriSint32 | criAtom_CalculateAdxBitrate (CriSint32 num_channels, CriSint32 sampling_rate) |
Calculate bit rate of ADX data 更多... | |
CriSint32 | criAtom_CalculateHcaBitrate (CriSint32 num_channels, CriSint32 sampling_rate, CriAtomEncodeQuality quality) |
Calculate bit rate of HCA data 更多... | |
CriSint32 | criAtom_CalculateHcaMxBitrate (CriSint32 num_channels, CriSint32 sampling_rate, CriAtomEncodeQuality quality) |
Calculate bit rate of HCA-MX data 更多... | |
CriBool | criAtom_GetStreamingInfo (CriAtomStreamingInfo *streaming_info) |
Acquire streaming info 更多... | |
CriBool | criAtom_SetFreeTimeBufferingFlagForDefaultDevice (CriBool flag) |
Returns whether to load streaming during file I/O downtime 更多... | |
#define criAtom_SetDefaultConfig | ( | p_config | ) |
Set default parameters for CriAtomConfig
[out] | p_config | pointer to the configuration structure for initialization |
#define criAtom_SetUserAllocator | ( | p_malloc_func, | |
p_free_func, | |||
p_obj | |||
) |
Register user allocator
[in] | p_malloc_func | memory allocation function |
[in] | p_free_func | memory deallocation function |
[in] | p_obj | user specified object |
typedef enum CriAtomThreadModelTag CriAtomThreadModel |
Threading models
typedef struct CriAtomConfigTag CriAtomConfig |
Configuration structure for initializing library
typedef void*( * CriAtomMallocFunc) (void *obj, CriUint32 size) |
Memory allocation function
[in] | obj | user specified object |
[in] | size | requested memory size (in bytes) |
typedef void( * CriAtomFreeFunc) (void *obj, void *mem) |
Memory deallocation function
[in] | obj | user specified object |
[in] | mem | address of the memory to be deallocated |
typedef void( * CriAtomAudioFrameStartCbFunc) (void *obj) |
Start audio frame callback function
[in] | obj | user specified object |
typedef void( * CriAtomAudioFrameEndCbFunc) (void *obj) |
End audio frame callback function
[in] | obj | user specified object |
typedef enum CriAtomSoundRendererTypeTag CriAtomSoundRendererType |
Sound renderer type
typedef enum CriAtomSpeakerIdTag CriAtomSpeakerId |
Speaker ID
typedef struct CriAtomPerformanceInfoTag CriAtomPerformanceInfo |
Performance information
typedef enum CriAtomEncodeQualityTag CriAtomEncodeQuality |
Encoding quality
typedef CriUint32 CriAtomFormat |
Format type
typedef struct CriAtomFormatInfoTag CriAtomFormatInfo |
Audio data format information
typedef enum CriAtomPcmFormatTag CriAtomPcmFormat |
typedef struct CriAtomStreamingInfoTag CriAtomStreamingInfo |
Streaming information
typedef enum CriAtomVoiceStopReasonTag CriAtomVoiceStopReason |
Voice stop reason
typedef void( * CriAtomDeviceUpdateCbFunc) (void *obj) |
Ambisonics order type
[in] | obj | User-specified object |
typedef enum CriAtomDeviceTypeTag CriAtomDeviceType |
Device type
typedef enum CriAtomSpeakerMappingTag CriAtomSpeakerMapping |
Speaker Mapping
typedef enum CriAtomAmbisonicsOrderTypeTag CriAtomAmbisonicsOrderType |
Ambisonics Order (Discontinued)
Threading models
枚举值 | |
---|---|
CRIATOM_THREAD_MODEL_MULTI | Multithreading
|
CRIATOM_THREAD_MODEL_MULTI_USER_DRIVEN | Multithreading (user-driven)
|
CRIATOM_THREAD_MODEL_USER_MULTI | User multithreading
|
CRIATOM_THREAD_MODEL_SINGLE | Single threading
|
Sound renderer type
enum CriAtomSpeakerIdTag |
Speaker ID
Encoding quality
enum CriAtomPcmFormatTag |
Voice stop reason
enum CriAtomDeviceTypeTag |
Device type
Speaker Mapping
const CriChar8* criAtom_GetVersionString | ( | void | ) |
Returns the version number and build information of the library.
CriSint32 criAtom_CalculateWorkSize | ( | const CriAtomConfig * | config | ) |
Calculate work area size required for initializing library
[in] | config | configuration structure for initialization |
>= | 0 successfully completed |
-1 | error occurred |
void criAtom_Initialize | ( | const CriAtomConfig * | config, |
void * | work, | ||
CriSint32 | work_size | ||
) |
Initialize library
[in] | config | configuration structure for initialization |
[in] | work | work area |
[in] | work_size | work area size |
The specific code is as follows:
[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.
The specific code is as follows:
void criAtom_Finalize | ( | void | ) |
Finalize library
CriBool criAtom_IsInitialized | ( | void | ) |
Check library initialization status
CRI_FALSE | uninitialized |
CRI_TRUE | initialized |
CriBool criAtom_IsAudioOutputActive | ( | void | ) |
Checking whether the audio output is valid
CRI_TRUE | Valid |
CRI_FALSE | Invalid |
void criAtom_ExecuteMain | ( | void | ) |
Execute server processing for multithreading.
void criAtom_ExecuteAudioProcess | ( | void | ) |
Execute server processing for user multithreading.
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.
void criAtom_SetUserMallocFunction | ( | CriAtomMallocFunc | func, |
void * | obj | ||
) |
Register memory allocation function
[in] | func | memory allocation function |
[in] | obj | user specified object |
void criAtom_SetUserFreeFunction | ( | CriAtomFreeFunc | func, |
void * | obj | ||
) |
Register memory deallocation function
[in] | func | memory deallocation function |
[in] | obj | user specified object |
void criAtom_SetAudioFrameStartCallback | ( | CriAtomAudioFrameStartCbFunc | func, |
void * | obj | ||
) |
Register start audio frame callback function
[in] | func | start audio frame callback function |
[in] | obj | user specified object |
void criAtom_SetAudioFrameEndCallback | ( | CriAtomAudioFrameEndCbFunc | func, |
void * | obj | ||
) |
Register end audio frame callback function
[in] | func | end audio frame callback function |
[in] | obj | user specified object |
void criAtom_SetDeviceUpdateCallback | ( | CriAtomDeviceUpdateCbFunc | func, |
void * | obj | ||
) |
Registering a device update notification
[in] | callback | Device update notification callback function |
[in] | obj | User-specified object |
void criAtom_Lock | ( | void | ) |
Prevent server process interrupt
void criAtom_Unlock | ( | void | ) |
Allow server process interrupt
void criAtom_ChangeDefaultChannelConfig | ( | CriSint32 | num_channels, |
CriAtomChannelConfig | channel_config | ||
) |
Specify channel mapping pattern
[in] | num_channels | Number of Channels |
[in] | channel_config | Channel Config |
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 |
void criAtom_ChangeDefaultChannelOrder | ( | CriSint32 | num_channels, |
const CriSint32 * | channel_order | ||
) |
Changed the default channel order
[in] | num_channels | Number of Channels |
[in] | channel_order | 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 |
Channel Number | Possible channels |
---|---|
0 | Left |
1 | Right |
2 | Center |
3 | LFE |
4 | Surround Left |
5 | Surround right |
6 | Top left |
7 | Top right |
void criAtom_SetAmbisonicsInputFormat | ( | CriAtomAmbisonicsFormat | format | ) |
Ambisonics audio format specification
[in] | format | format |
void criAtom_AttachPerformanceMonitor | ( | void | ) |
Added performance monitor function
void criAtom_DetachPerformanceMonitor | ( | void | ) |
Delete performance monitor function
void criAtom_ResetPerformanceMonitor | ( | void | ) |
Reset performance monitor
void criAtom_GetPerformanceInfo | ( | CriAtomPerformanceInfo * | info | ) |
Acquire performance information
CriSint32 criAtom_CalculateAdxBitrate | ( | CriSint32 | num_channels, |
CriSint32 | sampling_rate | ||
) |
Calculate bit rate of ADX data
[in] | num_channels | number of channels in the data |
[in] | sampling_rate | sampling rate of the data |
CriSint32 criAtom_CalculateHcaBitrate | ( | CriSint32 | num_channels, |
CriSint32 | sampling_rate, | ||
CriAtomEncodeQuality | quality | ||
) |
Calculate bit rate of HCA data
[in] | num_channels | number of channels in the data |
[in] | sampling_rate | sampling rate of the data |
[in] | quality | encode quality of the data |
CriSint32 criAtom_CalculateHcaMxBitrate | ( | CriSint32 | num_channels, |
CriSint32 | sampling_rate, | ||
CriAtomEncodeQuality | quality | ||
) |
Calculate bit rate of HCA-MX data
[in] | num_channels | number of channels in the data |
[in] | sampling_rate | sampling rate of the data |
[in] | quality | encode quality of the data |
CriBool criAtom_GetStreamingInfo | ( | CriAtomStreamingInfo * | streaming_info | ) |
Acquire streaming info
[out] | streaming_info | Pointer to location to save streaming information |
CRI_TRUE | Values were acquired |
CRI_FALSE | Values were not acquired |
CriBool criAtom_SetFreeTimeBufferingFlagForDefaultDevice | ( | CriBool | flag | ) |
Returns whether to load streaming during file I/O downtime
[in] | flag | CRI_TRUE = Use downtime during file I/O for loading |
CRI_TRUE | Process completed normally. |
CRI_FALSE | An error occurred. |