CRIWARE Unity Plugin Manual  Last Updated: 2024-07-12
Low-latency sound playback on Android
Attention
  • This feature is not available when SonicSYNC is enabled
  • We recommend using SonicSYNC as it allows for lower latency than this feature.
On Android, you can specify the number of voice pools for low-latency sound playback.
By playing sounds from the voice pools for low-latency sound playback, sounds can be played with a shorter latency than with the usual playback.

How to Use Low Latency Playback
For low-latency playback, use the following procedure.
  • 1. In the CRIWARE Library Initializer component, specify the number of low-latency standard voice pools.

    cri4u_android_lowlatency_config.png
    Settings in the CRIWARE Library Initializer

Attention
For each "Streaming Voices" (number of streaming playbacks) in the low-latency standard voice pools, one CriFsLoader handle is required.
Whenever you increase the number of Streaming Voices, you must also increase the Number of Loaders in the File System Config group of CRIWARE Library Initializer by the same number.
  • 2. Select the "Low Latency Playback" option in the CriAtomSource component before starting to playback.

    cri4u_android_lowlatency_atomsource.png
    CriAtomSource property
If you configure the CriAtomSource in the script, set the CriAtomSource.androidUseLowLatencyVoicePool property to true.

Using low-latency audio playback or standard playback explicitly
If you play audio with the default CriAtomSource without setting "Low Latency Playback" to true, voices will be automatically assigned to the standard or low-latency voice pool according to the availability of the pools.
Please take one of the following measures if you want to explicitly perform standard playback.
Attention
The following restrictions exist when sounds are being played from a low-latency sound playback voice pool.
Use this feature only for sounds for which reducing the latency - even slightly - is important, like some sound effects. Use the normal playback for BGM and environmental effects.
Attention
  • Only ADX/HCA can be used. It is not available when using HCA-MX.
  • the envelope feature cannot be used. Therefore, the envelope specified in the data is ignored.
  • The maximum capacity of low-latency audio playback Voice Pool (including memory and stream playbacks) is 6 .
    • If the Unity standard audio is enabled, the limit is 5.
    • If the capacity of Voice Pool for low-latency audio playback is exceeded when the playback is performed, playback will be attempted in the standard Voice Pool.
      Therefore, the delay of audio playback may increase, and the volume may also be affected by the sound effects set by the device.
  • The sampling rate of the audio data is 48000Hz or less. (Restrictions on 22050/44100Hz have been relaxed in SDK Ver.2.90)
  • Only 2D panning and the volume can be adjusted. DSP effects, such as pitch adjustment and reverb, are not available.
    Please note that in addition to pitch adjustment at runtime, pitch change on the CRI Atom Craft side is not available.