CRI ADX
Last Updated: 2024-07-17 10:47 p
|
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... | |
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... | |
#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.
Enumerator | |
---|---|
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. |