Spatializer breaking for fast moving object

I have multiple fast moving objects (airplanes) on splines. They each have an FMODAudioComponent attached to them. In test levels, they work fine, but when I bring them into my main game world, there’s a significant delay from when the listener enters the spatializer’s radius to when the sound is audible, and when it becomes audible, it doesn’t fade in, it cuts in loud. Basically, the plane engine sound cuts in about a second too late, then once it has started, it fades out correctly from there until the volume is cut altogether. This results in the planes cutting in at jarring times and loud volumes, or depending on how fast they’re moving, sometimes not appearing to emit any sound at all.

I’ve been debugged the positions and looked at the spatialization radius. The sound should very clearly be heard, and the position info is being correctly sent in UFMODAudioComponent::OnUpdateTransform. It seems like this only happens when the spatializer gone out of range, it messes up the next time the radius is entered, when the sound is started again. As long as the listener remains within the radius, the sound fluctuates in volume correctly.

The sound is an 8 second loop. No effects other than spatializer, set from 0-250 min/max with auto envelopment. Max Instances is infinite, Priority is Medium.

When I raise the priority, it works a more consistently, but will still occasionally cut in suddenly. When I set the event to Persistent, no change. If I cut out all the other sounds in the game it works, but that is obviously not a feasible option. I’m assuming that this is because I got too much going on. If so, is there a log or a check or a warning that can kick in well before things get to this point? And if this doesn’t sound like a manifestation of resource starvation, where should I be looking to try to fix it?

Thanks,

Nate

Have you tried connecting the FMOD Studio profiler while observing these issue?

You should be able to use that to get detailed information about what is happening, which voices are virtual, positions and parameters values, etc.

Hi Mathew,

Actually this morning we “fixed” it by raising the Total Channel Count from 512 to 1024. Is there any way to catch that in code, so if this comes up in the future we can get an alert when we’re exceeding that?

Glad to hear you found the issue, just be careful you don’t have a channel leak with counts getting up that high. The profiler is still the best method for diagnosing your channel usage and balancing sound quality against performance.

Internally FMOD will virtualize sounds when the channel limit is breached and while increasing the channel count may solve your issue right now, it’s not always the best solution. Consider looking at why the counts are getting high and determine if you need more instance limiting.