CRI ADX  Last Updated: 2024-07-17 10:47 p
About CriAtomAsr
CriAtomAsr is an API used to access the ASR (Atom Sound Renderer).
The ASR (Atom Sound Renderer) is a software sound renderer module.
It is primarily used on platforms that do not have dedicated hardware-based sound processing.
The ASR provides features such as multi-channel mixing, resampling, filters, envelopes,
bus send routing, reverb and echo. It is capable of flexible, powerful
sound rendering.
The ASR contains the following sub-modules.

ASR Voice

This module performs voice signal processing on PCM data received from the decoder and then outputs the result to the ASR bus.
It is an internal module of the voices allocated by the voice pool.
Module Features
  • Pre-delay
    Controls the delay from the time a playback request is made until the actual playback is performed.
  • Resampling
    When audio with a sampling frequency different from the one of the renderer is input, it is resampled.
    This feature is also used when a pitch parameter is specified.
  • Insertion DSP
    Enables the addition of effects such as time stretching.
  • Biquad Filter
    A generic biquad filter that can be used for equalization. The type of the filter can be selected.
  • Band Pass Filter
    A bandpass filter with user-definable cutoff frequency for low and high frequency ranges.
  • Envelope Controller
    Applies an envelope whose shape is determined by Attack, Hold, Decay, Sustain and Release parameters.
  • Channel Strip
    Outputs PCM data to multiple buses.
How to Use it
When creating a CriAtomExVoicePoolHn or a CriAtomPlayerHn, you can specify CRIATOM_SOUND_RENDERER_ASR for the sound_renderer_type in the config to create an ASR voice internally.
API
There is no API to directly access an ASR voice.
This is normally performed through the CriAtomExPlayer API or CriAtomExPlayback API.

ASR Bus

Performs sub-mixing based on the input from multiple ASR voices and/or ASR buses.
DSP effect processing is then performed on the result of that sub-mixing.
Finally, the sound signal is output to other buses according to the channel strip and bus send router.
Module Features
  • Sub Mixer
    Mixes ASR voices and/or PCM data sent from another ASR bus.
  • DSP Effect Chain
    Applies up to a maximum of eight DSP effects.
  • Channel Strip
    Outputs PCM data to multiple buses.
  • Level Analyzer
    Measures the peak and RMS of the audio signal passing through the bus.
How to Use it
Call criAtomEx_AttachDspBusSetting to create all the settings at once.
API
The APIs to access the ASR bus are as follows.
criAtomExAsr_SetBusVolume ASR bus volume setting
criAtomExAsr_SetBusMatrix ASR bus level matrix setting
criAtomExAsr_SetBusSendLevel ASR bus send level setting

DSP Effects

This module can apply a variety of effects to the sound.
You can attach up to eight effects to an ASR bus.
The DSP effects that can be used by the ASR are as follows.
How to Use it
Call criAtomEx_AttachDspBusSetting to create all the settings at once.
API
The APIs to access the DSP effects are as follows.
criAtomExAsr_SetDspParameter DSP parameter settings
criAtomExAsr_SetDspBypass DSP bypass setting

ASR Rack

This module can hold multiple ASR buses (up to a maximum of 64).
The result of bus 0 is output to the platform's audio port or another ASR rack.
How to Use it
Use criAtomExAsrRack_Create to create it.
API
The APIs to access the DSP effects are as follows.
criAtomExAsrRack_Create Create an ASR rack
criAtomExAsrRack_Destroy Destroy the ASR rack
criAtomExAsrRack_SetBusVolume Volume setting for a bus in the ASR rack
criAtomExAsrRack_SetBusMatrix Level matrix setting for a bus in the ASR rack
criAtomExAsrRack_SetBusSendLevel Bus send setting for a bus in the ASR rack
criAtomExAsrRack_SetDspParameter DSP bypass setting in the ASR rack
criAtomExAsrRack_SetDspBypass DSP parameter settings in the ASR rack
Additional Information
When the ASR is initialized, one rack will be created as the default rack.
criAtomExAsr_SetBusVolume (0, 1.0f); and
criAtomExAsrRack_SetBusVolume(CRIATOMEXASR_RACK_DEFAULT_ID, 0, 1.0f);
perform the same processing.