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.
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.
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.
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.