0
0

Hey guys,

I have a performance-related question for you… I’m using FMOD’s low level library for the core of our audio system. Naturally, there are all sorts of ways to adjust various channel properties over time, such as volume, pan, pitch, pan3D, spread3D, occlusion3D, etc.

In my sound class wrapper, would it be more efficient for me to only change these properties when they actually change values, or simply set them each update tick based on current values? If FMOD does this sort of check internally, then there’s obviously no need for me to do so as well.

Thanks!

  • You must to post comments
0
0

FMOD stores those values internally so they only need to be set when they change. The only reason for storing your own copy of those properties would be so that your getters and setters will work with invalid handles. If that isn’t a concern for you then just wrapping FMOD’s getters and setters should be sufficient.

  • You must to post comments
0
0

I understand FMOD stores those values internally. The reason I’m currently setting those properties each frame is because I’ve built an extensive audio engine on top of the low-level FMOD API. All those properties are dynamic, and can change at any time, so I was just setting them each update.

Looking at the source code, it appears that, for example, calling channel->setVolume() does a fair amount of work even if it’s setting the volume to the same value that’s stored internally. I’ll make sure to check to see that parameters have changed before calling those functions. Thx.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.