You can’t just add anything to the Android res folder. There is a very strict structure for the things that go into the res folder:
Note that there is android/res/raw which is for raw data of any format. But loading from the res/raw folder requires the use of the Android API function Resources.openRawResource()
so that’s not going to help you.
The instructions for defold-fmod specify that the banks should be put in android/assets/banks
.
So move the banks to ROOT/bundle_resources/android/assets/banks
and the bank files should end up in the assets
folder of your APK.
Ok, I finally made it. Thank you very much for your support @britzl and @Mathias_Westerdahl .
I’m showing a way to do it in case someone is struggling as much as I am.
For create folder in assets :
Result :
And for load the banks :
local bundle_path = sys.get_application_path()
local system_name = sys.get_sys_info().system_name
if system_name == "Android" then
path_to_banks = "file:///android_asset/banks"
bank = fmod.studio.system:load_bank_file(path_to_banks.."/Darksynth.bank", fmod.STUDIO_LOAD_BANK_NORMAL)
bankString = fmod.studio.system:load_bank_file(path_to_banks.."/Darksynth.strings.bank", fmod.STUDIO_LOAD_BANK_NORMAL)
end
If I have time I hope to do a blog with lots of tips on how to use the FMOD lib easily.