CRIWARE Unity Plugin Manual  Last Updated: 2024-07-12
Audio compression codec

Supported audio compression codecs

This system supports the following audio compression codecs:

Original audio codecs
Codec Description
ADX compression High-quality, low-load codec with a compression ratio of about 1/4
HCA compression High-quality, high-compression codec with a maximum compression ratio of 1/16
HCA-MX compression HCA data specially encoded for HCA-MX playback
HCA is the recommended audio compression codec.

Features of each codec

ADX
ADX is a super-low-load audio compression codec.
Although its compression rate is lower than HCA, it can play a lot of sounds with a light load, because the decoding is very lightweight.

HCA
HCA is designed to achieve a low load, high quality, and high compression.
(Its compression ratio is comparable to general-purpose audio codecs such as mp3 or AAC.)
Because of its simple algorithm, HCA operates at a lower load and uses less memory than general-purpose audio codecs.
Moreover, since it is designed to avoid fast load fluctuations, it does not disturb the application's processing at a specific timing.

adx2u_keys_ADX_A_32.png

Concerning the HCA encoding, five levels of sound quality (compression ratio) are available.
For the relations between encoding settings and compression ratios, see the "CRI Atom Tool User Manual."

HCA-MX
HCA-MX is a playback method where HCA data is mixed before decoding.
With an ordinary audio compression codec, the CPU load increases ten times when ten sounds are played, but, with HCA-MX, the load only doubles.
For HCA-MX playback, the same format of sound data as for the HCA codec is used, but sampling rates and loop sections are fixed when encoding the data.
If you encode some sound data that does not meet the HCA-MX playback conditions, its sampling rate and playback pitch may be changed at encoding.
For HCA-MX playback, the sound data is mixed before decoding.
It means that it is not possible to use functions such as filtering and pitch change on a per-sound basis (as well as seamless concatenated playback) during HCA-MX playback.

Available functions

The table below shows the available functions for each codec.

Available functions for each codec
Function ADX HCA HCA-MX Remarks
Loop playback Yes Yes Partially For loop playback with HCA-MX, the number of samples in a loop section must be a multiple of 128.
Seek playback Partially Yes Partially During seek playback with ADX, noise may occur at the playback start position and at the loop position.
During seek playback with HCA-MX, the sound may be distorted at the playback start position.
Seamless concatenated playback Yes Yes No
Filter callback Yes Yes No
Volume change Yes Yes Yes
Pan change Yes Yes Yes
Pitch change Yes Yes No
Envelope settings Partially Partially No Whether it is available depends on the target.
Biquad filter Yes Yes No
Band-pass filter Yes Yes Partially The band-pass filter in HCA-MX can change the sound only by increments of 1/256th of the sampling rate.
Bus send level settings Yes Yes No