Hello, i am using H5 fmod SDK to develop my game.
But there is something wrong with bank loading, i got this error
[ERR] FMOD_OS_File_Open : fopen failed to open ‘F:/res/assets/FmodBanks/Master.strings.bank’, errno = 44
fmodstudioL.js:9 [ERR] RuntimeBankModel::openFile : Failed to open file ‘F:/res/assets/FmodBanks/Master.strings.bank’
fmodstudioL.js:9 [ERR] FMOD_OS_File_Open : fopen failed to open ‘F:/res/assets/FmodBanks/BGM_combat_boss.bank’, errno = 44
fmodstudioL.js:9 [ERR] RuntimeBankModel::openFile : Failed to open file ‘F:/res/assets/FmodBanks/BGM_combat_boss.bank’
And my code is:
Writing in typescript
var fmod: FMOD = {}
fmod = {
TOTAL_MEMORY: 24 * 1024 * 1024,
preRun: () => {
console.log('FMOD preRun. Mounting files...');
fmod.FS_createPreloadedFile('/', 'Master.bank', 'F:/res/assets/FmodBanks/Master.bank', true, false);
fmod.FS_createPreloadedFile('/', 'Master.strings.bank', 'F:/res/assets/FmodBanks/Master.strings.bank', true, false);
},
onRuntimeInitialized: () => {
console.log('Runtime Initialized!');
let outval: any = {};
fmod.Studio_System_Create(outval);
let system = outval.val as FMOD.StudioSystem;
system.initialize(128, FMOD.STUDIO_INITFLAGS.NORMAL, FMOD.INITFLAGS.NORMAL, null);
system.loadBankFile('F:/res/assets/FmodBanks/Master.strings.bank', FMOD.STUDIO_LOAD_BANK_FLAGS.NORMAL, outval);
system.loadBankFile('F:/res/assets/FmodBanks/BGM_combat_boss.bank', FMOD.STUDIO_LOAD_BANK_FLAGS.NORMAL, outval);
system.getEvent('event:/BGM/BGM_combat_boss', outval);
let desc = outval.val as FMOD.EventDescription;
desc.createInstance(outval);
let inst = outval.val as FMOD.EventInstance;
inst.start();
setInterval(() => {
system.update();
}, 1000 / 60);
}
};
FMODModule(fmod);