How to avoid sleep overhead when loading the master bank/master string bank

In my project, loadBankCustom is used to load banks.
When loading the master bank in the process of initializing the FMOD Env,I setted the bank to load synchronously. And then I noticed that there was a sleep overhead of several hundred milliseconds. This results in a time-consuming process for initialization. May I ask what sleep does here? Is there any way to avoid this cost?


As you have specified you are loading synchronously, the main thread will sleep until the bank load thread is done. If you want to avoid the sleep you could load banks asynchronously, and monitor for when bank load is complete with Bank.getLoadState. A further explanantion can be found under FMOD API | Studio API.

Hope this helps!

Thank you for your reply.
Of course asynchronously loading will be helpful.
I want to know why the sleep always costs Hundreds of milliseconds when we are loading synchronously.
According to the observation, the loading porcess will not cost that much.

Is it possible to get a code snippet of how you are loading the banks with loadBankCustom?