Hello, we are using FMOD 2.03.08 with UE5.6 and noticed that calling the setPause() function causes audio channel count to increase from our typical 100–150 channels to 1024, and memory usage keeps growing as well. Is this a known issue?
Currently, we have a workaround where, instead of using setPause(), we save timeline position and call stop(), ensuring that event instance doesn’t get cleaned up. To resume we seek to the saved position and call start(). Is this a good solution?
Can you go into more detail about how you are using setPaused()?
Are you using C++ or Blueprints?
Are you calling setPaused()on the FMODAudioComponent, EventInstance, Bus, or Channel?
Your workaround does sound like it a good solution in the meantime.
Here are some more details about how and where we are using setPaused()
It’s used to pause audio playback when actor leaves the ground making sure that state gets set only when it actually changes and does not spam for example setting audio playback to paused.
working in c++
pausing audio playback by calling SetPaused()function from FMODAudioComponent where setPaused() gets called on EventInstance
I’m not sure why that would be happening if you are just calling SetPausedto pause/resume the Event, are you able to record a profiler session to share with us at all?
Sorry for the long delay had some other tasks that required my attention.
I have uploaded a couple of profiler sessions both were recorded during the same game session. The first session was recorded shortly after loading into the game world, and the second one was recorded ~30–60 minutes later. Throughout the entire session, the user was standing still, and there shouldn’t be anything that increased FMOD memory usage. However, memory usage keeps increasing over time. The workaround I mentioned in the original post completely eliminates this gradual increase in memory usage.
Thanks very much for providing the profiler captures.
I’m not seeing anything specifically to do with setPaused but I can see in both of the sessions, one event keeps spawning instances without releasing many of them:
I can see that this event contains a large number of referenced events too, if any of those are using callbacks or programmer sounds (where memory needs to be manually allocated and pinned in code) this could potentially cause memory leaks.