Is there any way to change how fast are event parameters updated?
The parameter update frequency seems to tied to fps that the game is currently running at.
I’m dealing with fast revving engine sounds. When the framerate is low (I.e. around 30fps) pitch of the engine sound is not being updated fast enough for the change to sound smooth and the result is very artificial sounding. On high framerates the problem does not occur because of the higher update frequency.
I have tried updating event parameters in FixedUpdate but it doesn’t fix the problem and the parameter update frequency is still tied to game fps.
I can record a sound comparison if necessary.
Thank you in advance!
Have you tried modifying RuntimeManager.cs? If you change RuntimeManager.Update to RuntimeManager.FixedUpdate you should be able to get FMOD dispatching your parameter changes faster.
I tried doing that and the update rate is still the same. Is there anything else i can try?
The problem is that FMOD’s update, in
RuntimeManager.Update, is tied to the games framerate.
FixedUpdate’s default timestep is 0.02, or 50 fps, although it runs on the same loop as Update but the difference is that FixedUpdate can trigger more or fewer times than Update. That being said it should really only be used for physics and overuse of it can cause performance issues. https://docs.unity3d.com/ScriptReference/MonoBehaviour.FixedUpdate.html
If you are using FixedUpdate to update parameter values, while the framerate is lower than the fixedUpdate timestep, this would likely cause gaps in the value updates (eg. data, data, data, LONG WAIT, data, data, data, LONG WAIT…). One way around this could be to use seek speed on the events parameter instead of handling the parameter update in game.