Sound delay on Unity

Hello!

I currently play my sounds in-game by calling PlayOneShot from RuntimeManager. However, the sounds have a noticable delay once they are played. I have tried playing creating an instance of the sounds and playing that instance, but the delay is still there, (although, a little smaller). What can I do?

Hi,

Could you try enabling the Load Bank Sample Data (Unity Integration | Settings - Initialization) which should reduce latency whenever an event is played.
image

Hope this helps.

Nope, I tried toggling it on, but it didn’t change anything… (Building the game and executing the file doesnt change anything too, thought I’d say that).

1 Like

(Forgot to reply, @Connor_FMOD, my bad)

1 Like

Hi,

Something else to check is the loading mode you are using on the audio files: FMOD Studio | Managing Assets - Loading Modes. Can you confirm that you are not using the Streaming mode as this will have the highest latency when playing.

Would it be possible to get a screenshot of the event in Studio that you are experiencing the issue with?

1 Like

@Connor_FMOD, sure thing! The Asset isn’t using the Streaming mode either… (I have the entire folder on Compressed, does that matter?)

Photo of the asset itself:

Photo of the folder the asset is in:

And photo of the Event:

1 Like

@Connor_FMOD, should I try and put the folders on decompressed, or is there another setting that can cause delay so I can check whether its toggled?

Hi,

Thank you for the screenshots.

From what I can see all the settings are correct. How long is the delay that you are noticing? Are there any logs in the Unity editor that look like this:

[FMOD] EventInstance::update : Event {275351b8-616d-437c-8515-6c5cea1c1900} waited 210 milliseconds for sample data to load. Preload sample data to avoid this delay.

Would it be possible to get the built banks including the event that you are noticing the delay uploaded to your profile so I can test on my side? Please note you will have to register a project with us to be able to upload.

Hello @Connor_FMOD! There arent any logs that look like that, no… And I tried uploading the profile but it says I cant because am a hobbyist? (Non commercial / hobbyists do not need to register a project. See EULA for free license.), thanks again!

Hi,

Could you try again for me? We have changed it on our side. Thanks

Hello @Connor_FMOD, I still cant upload a registration… should I change my account type temporarily just for this? Thank you!

1 Like

Update @Connor_FMOD! Uhhhh, weirdly enough, the build is working fine now? The instanced sound is the one delaying now, which I consider extremely weird, Ill make it one shot again and see how it goes. Thank you for your help up to this point though! (It probably began working after the first fix attempt and I just never tested the build or something? I dont know).

1 Like

That would make sense as loading the sample data would be the best solution to the issue. If you do have any other issues please do not hesitate to post again.

Will do! Thank you @Connor_FMOD :D!

1 Like