Loading progress when loading audiosprite not working

Hi all!

I’m developing a game, and I’m loading all my game assets in preload Scene. I’m using load progress to show a progress bar, but when i load audisprites, progress reach 100% before finish loading audio file. It seems that progress only handle audiosprite json file, but not audiosprite audio file.

Is there any solution to handle this progress the right way?

Best Regards!

How can you tell it’s not finished loading?

Because complete event doesn’t trigger until several seconds after progress reach 100%. I have tested with progressFile event too.

Could you add to preload():

    this.load
        .on('add', (k, t) => console.log('addfile', k, t))
        .on('fileprogress', (f, p) => console.log('fileprogress', f.key, f.type, p))
        .on('load', (f) => console.log('load', f.key, f.type))
        .on('filecomplete', (k, t) => console.log('filecomplete', k, t))
        .on('start', () => console.log('start'))
        .on('postprocess', () => console.log('postprocess'))
        .on('complete', (l) => console.log('complete'));

Then in your browser (Chrome or Firefox, I think) turn on the option to show timestamps in console.

Of Course! here it is:

I think you’re seeing the difference between load and filecomplete, which is when audio decoding happens.

Once loader progress reaches 1 you could show Processing … or something just so it doesn’t look stuck.

// Add *before* adding files
this.load
    .on('addfile', (k, t) =>
    {
        console.time(`load ${t}/${k}`);
    })
    .on('load', (f) =>
    {
        console.timeEnd(`load ${f.type}/${f.key}`);
        console.time(`process ${f.type}/${f.key}`);
    })
    .on('filecomplete', (k, t) =>
    {
        console.timeEnd(`process ${t}/${k}`);
    });

I understand this, but loading progress should take account filecomplete event instead of load event, doesn’t it? it’ a little weird having loading bar progress complete while some files are still processing…