Can't change DSP update period(FMOD 2.03)

Hi there,I try to reduce the DSP update period in unity,so i used a callback to handle it:

public override void PreInitialize(FMOD.Studio.System studioSystem, Action<FMOD.RESULT, string> reportResult)
    {
        studioSystem.getAdvancedSettings(out ADVANCEDSETTINGS settings);
        settings.studioupdateperiod = 5;
        Debug.Log(studioSystem.setAdvancedSettings(settings));
    }

I changed DSP buffer size to 128 to ensure to reduce latency,but when i measured the update period using getTimelinePosition(out time),the latency still remains at 10ms.
If fmod for unity have a default minimum latency so I can’t continue to reduce it?

Hi,

Latency remaining at 10ms is likely caused by two things:

  1. The selected output type may not support extremely low latency audio. For example, FMOD’s WASAPI output supports a minimum buffer size of 10ms.
  2. The studio update period quantizes to the nearest mixer duration - since the minimum mixer duration is 10ms (as explained in point 1), a studio update period of 5ms will quantize to the 10ms mixer duration.

Try swapping to an output that supports lower latency audio, such as ASIO, and see whether that allows for a latency/buffer of less than 10ms. You may need to modify RuntimeManager.cs to override the output set in the Unity Editor - the relevant lines of code in the latest version of FMOD for Unity can be found at:

  • ~line 289 - the output type is retrieved from FMOD for Unity’s settings:
FMOD.OUTPUTTYPE outputType = currentPlatform.GetOutputType();
  • ~ line 330: the core system is set to use the specified output
result = coreSystem.setOutput(outputType);