UE4 FMODAmbientSound Play/Stop causes incorrect ambient settings to be applied

Hello.

We dynamically start and stop our FMOD Audio Components in order to cull a little bit of component tick in a given frame. We’re encountering issues where deactivating and then activating ambient sounds causes their applied ambient settings to be incorrect.

I’ve been able to reproduce the issue with the following simplified setup.

1.) Place an FMODAmbientSound inside an AmbientVolume
2.) Bind Audio Component Start/Stop to a key bind in the level editor.
3.) Start PIE. ‘Stop’ the given audio component
4.) ‘Play’ the given audio component
Expected Results: The same settings have been applied to the sound instance as would have been applied on first autoplay ‘Play’
Actual: After toggling, the interior settings do not match the audio volume in which they reside.

Is this a known issue? It looks like Ambient Sounds are AutoActivate by default, was this intentional? Should we not be mucking with that default setting?

Thanks!

No, it wasn’t! This is definitely a bug, and not one we’ve discovered before. I’ve added it to our bug tracker, so it’ll be fixed in an upcoming release of FMOD Studio.

In the mean time, it should be possible to work around this issue. Ambient zones do set the parameters of playing FMODAmbientSounds when the level begins, and if the FMODAmbientSounds are playing, so if you pause your zone-affected FMODAmbientSounds instead of stopping them then you should be able to get the audible behavior you want.

Thanks for the reply joseph!

We decided on a similar work around. We use a form of culling system to halt object ticks that are less relevant to the player location. Rather than using Stop/Start in this context, I’ve opted to just despawn/spawn the AmbientSounds, since they aren’t very large objects on the UE4 side.