CRIWARE Unity Plugin Manual  Last Updated: 2024-07-12
SonicSYNC

What is SonicSYNC?

SonicSYNC is a feature that minimizes audio latency.
When using SonicSync, 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

Please check the "Enable SonicSYNC" checkbox for each platform's initialization config in CriWareInitializer .

Notes

Supported platforms

Currently, SonicSYNC is only available on a limited number of platforms.
Please wait for future updates for the other platforms.

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, please refer to Platform-specific notes .

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 Voice Pools
  • Creating / Discarding Mana Players
  • Loading / Releasing an ACB and AWB
  • Attaching / Detaching DSP Bus settings
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 methods to check the CPU load of the ASR rack used for playback:
  • CriAtomExAsrRack.ResetPerformanceMonitor
  • CriAtomExAsrRack.ResetPerformanceMonitorByRackId
  • CriAtomExAsrRack.GetPerformanceInfo
  • CriAtomExAsrRack.GetPerformanceInfoByRackId
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 pages: