Do I need to call update every frame?

Hello! I’m trying to do some metering for volume levels on an event instance. I have some code that feels to me like it should work, but it only ever outputs 0.0 for all rmslevel channels.

I found this old topic:

I tried to find a way to call FMOD::System::update every frame (as the post implies to be the issue), seemingly I needed to do something called low level API initialization. However, all the examples I found used code that did not exist/compile with my FMOD plugin version.

So, I’m wondering, does the Unreal Integration for the FMOD plugin automatically call FMOD::System::update every frame, or is it something I have to do manually with C++ code? For the record, I have a project in the Studio tool and the banks successfully import into the Unreal project and playing events makes sound and is properly spatialized/attenuated.

If I do need to called FMOD::System::update every frame manually for getMeteringInfo to work properly, could someone point me towards a more up to date example of how I do this in UE 4.22 with FMOD Studio 2.00.03?

EDIT: I found an updated guide here https://www.fmod.com/resources/documentation-ue4?version=2.0&page=user-guide.html#programming-with-the-fmod-studio-c-api

I’m now able to successfully call update on the studio system every frame, but it doesn’t seem to help. Any other ideas?

You should not need to call update as the integration will take care of this.

I would check all you calls to FMOD, they should return an FMOD_RESULT which can tell you if something is going wrong.

Okay, I figured it out!

I was setting metering enabled on the DSP before FMOD studio was properly loaded, so the getMeteringInfo resulted in a bad command. Having the metering enabled function return a bool indicating success and retrying until it was true solved the issue.

1 Like