Request: Add LOAD_BANK_FLAGS parameter to RuntimeManager.LoadBank.

It’s really mostly on me, but for whatever reason I initially assumed that LoadBank would be asynchronous since there is an AnyBankLoading method - the name is a bit misleading since it seems to actually check if sample data is loading.

An optional flag parameter for LoadBank would be nice so that there would be option to asynchronously load a bank. The AnyBankLoading method might also need to be modified to account for this possibility.

Hi Chase,

Loading banks is already asynchronous and doesn’t require any additional flags.

https://www.fmod.org/docs/content/generated/example_studio/load_banks.html

However it seems you are correct - AnyBankLoading() is checking for if sample data is being loaded, not banks. This is not the expected behaviour and has been raised with the development team. Thank you for bringing this to our attention.

Thanks,
Richard

Really? I’ll check again, but it seemed like the call was blocking by default and was only nonblocking when I explicitly passed the nonblocking flag. That’s also consistent with the documentation for loadBankFile that you linked.

For the record, this is with the 1.08.08 version of FMOD Studio and the Unity integration, so I guess it’s possible this behavior has changed.

Hi Chase,

My apologies, you’re right. Loading banks is blocking by default unless the FMOD_STUDIO_LOAD_BANK_NONBLOCKING flag is passed into it. If you pass this flag in you can load banks asynchronously.

Thanks,
Richard

I have a follow up question/remark to this topic. Please correct me if I am wrong.

The LOAD_BANK flag seems to only work if the loadSamples bool is true in the LoadBank function(?)
So say that in my FMODUnity Settings I have “Load All Sample Data At Initialization” un-ticked (false). In this scenario sample data will be loaded on demand whenever an event is called, rather than being pre-loaded either NORMALLY or ASYNCHRONOUSLY.

This makes me deduce that Asynchronous loading is different from the default On-Demand loading.
Async loading will load all its sample data while not blocking the thread, on-demand loading only the samples of which ever event has been called and played.

Is my understanding correct?

After some more testing I have come to understand that NON_BLOCKING load and disabling loadSamples altogether from the LoadBank method achieve the same results.

Which to me sounds rather confusing at this point cause I thought NORMAL was the default loading flag.