CRI ADX  Last Updated: 2025-05-07 13:34 p
HCA-MX Playback

Sample Directory

/cri/pc/samples/criatomex/hca_mx_playback

Data used in the sample

/cri/common/smpdata/criatomex/
  • HCA_MX_SE.awb

Sample Description

This is a sample that plays HCA-MX data.
When playing HCA-MX data, all audio data must be created at the same sampling rate in advance.
In addition, the following settings must be made on the runtime side for HCA-MX playback.
  1. Set HCA-MX output settings when initializing the library.
  2. Create a voice pool for HCA-MX playback.
About library initialization
When playing HCA-MX data, settings for HCA-MX playback must be made when initializing the library.
Specifically, the following items must be set appropriately for the CriAtomExHcaMxConfig structure specified when initializing the library.
Main settings for the CriAtomExHcaMxConfig structure
Parameter to specify Description
num_mixers Specifies the number of mixers to use. Normally, specify 1.
Specify 0 if you do not use HCA-MX.
max_voices Specifies the total number of voices to be created as a voice pool.
If you are not using HCA-MX, specify 0.
max_sampling_rate
output_sampling_rate
Specifies the sampling rate of the audio data to be used.
max_input_channels
output_channels
Specifies the maximum number of channels of the audio data to be used.
Attention
If you are not using the model-specific library initialization function and are initializing the library using the criAtomEx_Initialize function, you must execute the criAtomExHcaMx_Initialize function.
About creating a voice pool
When playing HCA-MX data, you must create a voice pool that is different from the usual one (not the standard voice pool) for HCA-MX playback.
Specifically, you need to create a voice pool that HCA-MX can play using the criAtomExVoicePool_AllocateHcaVoicePool function.
When creating a voice pool, you need to set the sampling rate of the voice data to be played in player_config::max_sampling_rate in the CriAtomExHcaMxVoicePoolConfig structure.
:
/* Create HCA-MX voice pool */
pool_config.player_config.max_sampling_rate = 48000; // Set the same value as the audio data to be played
app_obj->hca_mx_pool = criAtomExVoicePool_AllocateHcaMxVoicePool(&pool_config, NULL, 0);
:
CriAtomExVoicePoolHn criAtomExVoicePool_AllocateHcaMxVoicePool(const CriAtomExHcaMxVoicePoolConfig *config, void *work, CriSint32 work_size)
Create an HCA-MX Voice Pool.
#define criAtomExVoicePool_SetDefaultConfigForHcaMxVoicePool(p_config)
Assign the default values to the configuration structure used to create a HCA-MX Voice Pool.
Definition: cri_le_atom_ex.h:618
Configuration structure used when creating a HCA-MX Voice Pool.
Definition: cri_le_atom_ex.h:3321
CriAtomStandardPlayerConfig player_config
Definition: cri_le_atom_ex.h:3258
CriSint32 max_sampling_rate
Maximum sampling rate.
Definition: cri_le_atom.h:1466
Attention
If you want to play HCA-MX using an AWB file or a single file instead of an ACB file, the following additional settings are required.