Fmod Running in H5 but Got Error 44 when loading banks

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);

Hi,

With the FMOD engine downloads, we provide example code that may help solve the issue. It can be found: "C:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API HTML5\api\studio\examples\simple_event.js"

Most FMOD functions also return FMOD.RESULT which can be used to check their success. Adding some checks to the results may help pinpoint the issue. We provide an example of how to check the results in the examples:

// Simple error checking function for all FMOD return values.
function CHECK_RESULT(result)
{
    if (result != FMOD.OK)
    {
        var msg = "Error!!! '" + FMOD.ErrorString(result) + "'";

        alert(msg);

        throw msg;
    }
}

Having a look, it may be an issue with not creating a PreloadFile for BGM_combat_boss.bank

Hope this helps!

Thank you so much!

1 Like