Sets the maximum latency in milliseconds that is needed by the target platform to buffer soundfiles from the storage medium.Namespace: psai.net
Assembly: psaiCoreDotNet (in psaiCoreDotNet.dll) Version: 220.127.116.11 (18.104.22.168)
public PsaiResult SetMaximumLatencyNeededByPlatformToBufferSounddata( int latencyInMilliseconds )
- Type: System..::..Int32
the buffering latency in milliseconds
Return ValueType: PsaiResult
PsaiResult.OK if successful
As there is currently no mechanism within Unity to check the actual latency needed by the target device to buffer and play back a sound, we solve this by providing a maximum latency value that should be enough for each given platform, and we delay all playback by this value. Please note that these value not only depends on the target platform, but also on the system specifications (like weaker/older mobile phones usually need more time to buffer), but also on the storage media (optical drives take much longer that harddrives). We provide default values for all the platforms supported by Unity that will be set automatically and will work in most cases. However you may choose to finetune these settings. Lower latency settings will improve overall reactivity of your soundtrack, but might result in dropouts.