I was wondering how to check if the loaded sound is 100% decoded and ready?
For Phaser 2 I used to use Sound.isDecoded, but it’s no longer available with Phaser 3.
It’s no fun having no BGM for the first 20 seconds of the phone game and I can’t find any relevant resource.
I could alternatively use uncompressed WAV format but it doesn’t solve the issue 100%.
I’m also interested in a solution to this problem.
I tried a number of suggested solutions found on quora and elsewhere but without success. So now I converted the mp3 to wav which means my background music track’s filesize is almost 6MB, compared to 1.34MB before.
Btw. what is the math here? Filesize means slower download times, so it depends on a good internet connection, while decoding time probably depends on CPU? Which one is the actual limiting factor for a low-end mobile device?
Update: Even with a WAV instead of an MP3 the first 10-15 seconds of gameplay is without background music in my game, when played on mobile. There must be a solution to this - what does everyone else do to check if music is fully loaded and decoded?
Thanks. I wish decoding were just part of the load() method for audio - who really needs to separate those steps anyway? At least it could be optional part of the load method, with a default flag set to true. Seems much easier to include audio loading and decoding in a preloader that way.