I have sound banks stored in file:///android_asset/banks directory in Android assets. I finally managed to open the files from the assets directory instead of a local copy of the bank in the files directory I’ve been using before (copying takes 2x space, though). However, the streaming performance from assets directory is exceedingly slow (2-3 sec delay). I read that on Unity there is a specific StreamingAssets folder where streaming assets go. In general for FMOD on Android, is there a specific directory subdirectory of assets that I would need to put my streaming banks instead of the banks subdirectory that I’m using at the moment? Or is there another way of speeding up the streaming performance to equivalent of a local file in the files directory I’ve used before?
What version of FMOD are you using?
We have been using 2.0.9 so far.
And just to be clear, I’m working with a Xamarin Android game. Generally, FMOD is working very well there. I thought that the slow performance of streaming from assets is because the assets are potentially compressed in the assets folder.
Unfortunately, we no longer support
2.00, could you please update to
2.02? Downloads can be found here: https://www.fmod.com/download. Documentation for migration major versions can be found here: FMOD Studio | Advanced Topics - Migrating FMOD Studio Projects.
Let me know if the error still persists after updating.
Yes, the problem persists after the updating to 2.02.15. We suspect it is caused by Android Assets being compressed. In fact, with 2.02.15 some streaming sounds fail to play at all, compared to a delay of a few seconds with 2.00.09.
I tested the sounds a bit more now, and I got the missing sounds to work now (a bank was missing from the test setup). Also, the streaming delay seems to be gone with the newer version, so things seem to be working now!
That’s good to hear. If you have any more questions, please do not hesitate to ask.
I have some further feedback here: The material slowness (2-3 sec delay in playing streamed assets etc.) still appears when we are using an APK format on Android (which I use for debugging), but not in AAB (which I use for release and distribution). It is a bit inconvenient that I get different performance while debugging compared to the release version, but obviously not a huge issue since the release versions work fine. Perhaps APK has the assets compressed while AAB saves them to disk uncompressed. In any case, I made an option for myself to load the banks to memory or copy them to disk outside of APK while debugging, which gives me the normal streaming performance.
Thanks for sharing the information. I will continue to investigate and post here if there is anything to share.