We recently startet using fmod for a shooter projekt and are currently trying to implement gunshots into the game. I used audio files that consist of a bundle of 20 shots at once to prevent spawning of too many individual events, but i noticed a delay of over 200ms when shooting the gun. I tried out smaller files that only consist of one gunshot and the delay was gone, so i figured there was a buffering problem with my sound files in unreal. I already looked up some posts in the fmod forum and found a way of preloading the events or even the whole bank, but sadly that had no effect on the delay. Am i missing something? Or is the problem not even related to buffering?
Thanks in advance
PS: these were the nodes in Blueprint i tried to buffer the samples.
How are you playing the event?
It could have something to do with the event creation.
You could also try attaching the Studio profiler, this can help to show you things like memory and CPU usage. It can also show you the time it takes for events sample data to load.
thanks for the reply.
Im currently using the play audio attached node via blueprints.
I used the profiler to check for cpu usage, but how can it display the time required to load the events?
Using the ‘Lifespans’ view, you can see when events are created, started, stopped and waiting for sample data to load.
okay so i used the livespans view, and i noticed a difference between when instance 1 is created and when sound actually is played. For the test i used a gunshot loop consisting of 20 shots, wich uncompressed is 14,1 MB. I also double checked the audio file itself if it contains some empty space at the beginning, but that was not the case.
If you are able to share your profiler capture I will be able to look into it further for you.
You can upload it to: https://fmod.com/profile#uploads
Including as much data in the package as possible would be best.
i managed to pack my profiler capture, but unfortunately i cant find a way in my profile to upload the package. When i click the provided link it just redirects me to my profile user details, where i already filled out all mandatory information.
this is what i get when i click the link, am i missing something?
yes now it worked. the package consists of three single gunshot sounds for comparision, folloed up by the 20 shot samples with the discussed latency.
Thanks for that, it looks like the asset/s for gunshot loop are being streamed which will cause a delay as it needs to read from file as it plays it.
Is there a possibilty to avoid streaming the assets and preload them?
You can’t override the streaming from the game, you have to configure this in the assets loading mode in the Studio project.