CRI ADX  Last Updated: 2024-07-17 10:47 p
SonicSYNC

What is SonicSYNC?

SonicSYNC allows for minimal audio latency.
When using this feature, CRI ADX will not perform any extra buffering, and will output the audio in synchronization with the buffer update of the platform's sound driver.
The playback latency can be up to 50% lower than with the regular method.

Usage

When initializing the Atom library, select the following model in CriAtomExConfig::thread_model :
Attention
SonicSYNC cannot be used with a non-multithreaded model.

Notes

Supported platforms

This function only supports certain platforms.
To know if your platform is supported, please refer to List of Functions and Implementation Statuses .

Switching to SonicSYNC

Due to the lower latency achieved with SonicSYNC, some audio-related timings may differ from the original rendering.
Therefore, timings may need to be adjusted based on the new latency to conserve synchronization .
This is especially true for music games as they are highly dependent on timing. In their case, please adjust the synchronization of the display and scoring analysis as necessary.
Moreover, the playback latency may not be constant.
Depending on the platform, the system itself may increase the latency when using background audio playback or a Bluetooth connection.
For details, refer to criatom_tgtspc_sonicsync .

Risks of sound stuttering

Using high CPU load Bus effects

Intermittent sound is more likely to occur when using the following effects, which are more CPU intensive:
  • PitchShifter
  • Reverb
  • I3DL2 Reverb
  • Headphone virtual surround
Using only one of these effects (other than the PitchShifter) will not trigger sound stuttering.
However, be careful when combining several effects.
Even if you are not using these particular effects, combining multiple effects on a Bus increases the risks of sound stuttering.
We are investigating ways to reduce the CPU load of the PitchShifter.

Blocking functions in the library

The following processes are blocking. Therefore, intermittent sound may be heard if their processing time takes too long.
  • Creating / Discarding a Voice pool
  • Creating / Discarding a Mana Player
  • Loading / Releasing an ACB and AWB
  • Attaching / Detaching DSP Bus settings
  • Locking with criAtom_Lock (if for a long time)
To avoid audio artifacts, it is recommended to perform these operations when the application is silent.

Identifying the cause of intermittent sounds

When SonicSYNC is enabled, even if the sound is intermittent, the usual warnings will not be issued.
This is because the sound stuttering when using SonicSYNC are not due to a lack of data in the sound buffer within the Atom library, but to the inability of the audio output thread itself to operate on a regular basis.
If the intermittent sound issue is severe, call the following functions to check the CPU load of the ASR rack used for playback:
Using these functions, you can get the interval at which the audio processing is executed.
An average processing time that is too large may be due to heavy effect processing or insufficient performance of the device itself.
Audio latency may vary on different devices, but if it exceeds 2000 microseconds, the risk of intermittent sound issue can be high.
If the maximum value of the processing interval often greatly exceeds its average value, the execution of the audio output thread may be hindered.
This may be due to the lack of threads that can be processed or the impact of background processing.
To get more details, check the status of the threads with the profiler provided in the development environment of each platform.
It is possible to check the detailed background processing status and the status of a specific thread.
If you encounter issues that occur on a specific device regardless of the CPU load, please contact our technical support.

Platform-specific notes

For the actual performance and remarks concerning each platform, please refer to the following page:
  • criatom_tgtspc_sonicsync