High Latency in UnrealEngine (editor and game)

Hi all!

I’m experiencing latency issues, sadly.
Now, the latency isn’t that bad, but it’s definitely noticable.

I did a few tests to see if I can reduce the amount of latency:
What I did to test the latency is setting up a microphone in the room, speakers blasting and measuring the duration of a mouse-click and the sound that’s supposed to play.

In FMOD Studio (clicking the play button):
WASAPI is roughly 193ms latency (through a Focusrite Scarlett interface)
ASIO is roughly 130ms latency.

In the engine I set up a simple widget with a button, and onPressed->PlayEvent2D+SetParameter
In Unreal Engine (Editor):

Output type = Autoselect (wasapi)
DSPBuffer Length = 128
DSPBufferCount = 3
FileBufferSize = 1024
Latency is around 130ms

Output type = ASIO
Untestable, no devices found in the editor

In Packaged Build (Shipping)

Output type = Autoselect (wasapi)(through a Focusrite Scarlett interface)
DSPBuffer Length = 128
DSPBufferCount = 3
FileBufferSize = 1024
Latency is around 116ms

Output type = ASIO
DSPBuffer Length = 512
DSPBufferCount = 1
FileBufferSize = 1024
Latency is around 132ms

On every output type and dsp setting there seems to be quite a bit of latency.
Is there a way to lower this?

Also, ASIO might not be a viable option (mainly because in editor it doesn’t work, and I don’t want everyone to download a driver for playing the game hah)

Thanks in advance,

Marcel

EDIT:
After lowering my DSP buffersize on the sound card (1024->128, 89ms->15ms) the latency is still 96ms

Hi,

Thank you for the detailed information. What version of Unreal and FMOD are you using?

Hi,

I’m using 4.27 (oculus source build) + FMOD 2.02.07
Although I’ve heard that WASAPI has terrible latency on it’s own, what can I expect to be the least amount of latency with that driver? I know ASIO should be able to get much, much lower latency. I couldn’t set the dsp buffer too low when using ASIO.

Also, I don’t know if this is the way to go, but I change the output driver as follow:

I modified the fmod plugin code to check the user-settings (asio enabled, dsp size/count) in the module startup (the part where the settings are read). It works, but may not be ideal since it requires a full restart for the game to use the new settings.

Any advice is welcome, thanks in advance!

Hi, apologies for the delayed response.

Thanks for that info.

Running simple tests without any of your improvements is showing 400ms for both FMOD and UE Sounds. I think you have pushed the improvements are far as possible currently.

On each button press are you creating a new event instance? Enabling the Load All Sample Data option in the Unreal Integration | Settings may help reduce it further for Streaming audio sources.

Could I see the modifications you made to the code?