Loading delay exceeded - even with preloaded sample data

I’m calling:
RuntimeManager.LoadBank(“bank name”, true);

And still getting this error message:

[FMOD] SoundSourceInstrumentInstance::startChannelIfReady : Loading delay exceeded, sound may play at incorrect time

UnityEngine.Debug:LogWarning (object)
FMODUnity.RuntimeUtils:DebugLogWarning (string) (at Assets/Plugins/FMOD/src/RuntimeUtils.cs:578)
FMODUnity.RuntimeManager:DEBUG_CALLBACK (FMOD.DEBUG_FLAGS,intptr,int,intptr,intptr) (at Assets/Plugins/FMOD/src/RuntimeManager.cs:108)

What could cause this warning message even with bank samples preloaded?

Hi,

Assuming all sample data is loading ahead of time correctly, this warning would usually be caused by issues when creating and playing FMOD Sound objects via the Core API, either directly or when using programmer instrument callbacks. This is especially likely when playing large files that are separate from the already loaded banks.

Could I get the following info from you?

  • Your Unity version
  • Your FMOD for Unity plugin version
  • Your FMOD Studio version
  • Whether you’re directly creating and playing sounds via the Core API, or making use of programmer instruments - if you’re using programmer instruments, whether you’re playing loose files, or files from an audio table
  • In FMOD for Unity’s settings, set your logging level to “Log”, enable API error logging, and share a full log from Unity where the issue occurs

Thanks for the response!

  1. Unity 6000.0.28f1
  2. FMOD Plugin 2.02.25
  3. FMOD Studio 2.02.25
  4. We’re using RuntimeManager.CreateInstance(/* guid here */); from the unity plugin to create an instance and then call .start() and .release(). These are not programmer instruments.
  5. Will do. I’ve attached the editor log.

Editor copy.log (418.7 KB)

@Leah_FMOD Is there anything else I could collect that would be helpful?

Thanks for the info and log!

There’s nothing that stands out in the log that indicates why you might be running into the warning, as all sound loading seems pretty standard, and there’s no concerning errors or logs besides the “ERR_INVALID_HANDLE” ones which don’t necessarily point to anything specific.

Are you hearing any audible issues when receiving the warnings, for example, any extra latency or artifacting? Also, could I get you to connect your Unity project or built game to FMOD Studio via live update, record a profiler session in which the warning occurs, package it with all options enabled, and upload it to your FMOD user profile for me to take a closer look?

Sure thing! I’ve just uploaded that to my profile. It’s called “Debugging.fspackage”

I’m not hearing any audible issues. Maybe the sounds are playing just a hair late? It’s hard to tell. No artifacting.

Please let me know if I can provide any further information. Thanks so much for your help! @Leah_FMOD

Hey @Leah_FMOD, I just wanted to make sure that upload worked OK. Did that come in?

Apologies - I’ve got your upload. I’ll take a look and get back to you soon.

@Leah_FMOD Thanks very much! Please, let me know if I can provide any further information/captures/etc.

Thanks again for the uploaded profiler session!

The Loading delay exceeded" warning is being caused by the fact that a number of events (i.e. “event:/SFX/Golf/Dolf Impact”) are playing assets with extremely short lengths that are approaching the FMOD mixer’s block size, causing issues when FMOD attempts to schedule their playback. This is a benign warning, but if you want to remove it from your log, you have a few options:

  • Very slightly increase the schedule delay on the event using eventInstance->setProperty(FMOD_STUDIO_EVENT_PROPERTY_SCHEDULE_DELAY, 1024);, which will increase the delay before the event plays by a tiny amount, but should stop the warning
  • Modify the playing assets by somehow increasing their total length. This could be done by adding silence to the end, combining the short assets with the tail that plays afterwards, etc.
  • Manually filter the warning yourself, likely by modifying DEBUG_CALLBACK() in RuntimeManager.cs similar to how it’s been done in this post for a different warning: Adding signal DSP causes starvation - #7 by Leah_FMOD

Hey @Leah_FMOD, thank you so much for taking a look at the profiler capture!

I looked at the event you mentioned and here’s a screenshot of what it looks like:

So the bottom (blue) clip is just about 2 seconds long, and the top clips are definitely very short. 00:00.030

So it sounds like the issue is those top (green) clips? I’ll try to extend them and see if the issues go away. Thank you so much for the suggestions!

The green clips would be the problem ones, yes - feel free to let me know if you still run into the issue after extending them.

1 Like