phaser
phaser copied to clipboard
Problem with preloaded audio assets when exiting and re-opening game
I've noticed some weird behavior when exiting game and re-opening the game while having preloaded audio assets.
I'm getting:
Uncaught TypeError: Cannot read property 'isSoundDecoded' of null
originating from the following code-snippet from Sound.js:
// Does the sound need decoding?
if (this.game.cache.isSoundDecoded(this.key))
It seems like Phaser doesn't setup/clear the cache properly when re-opening the game.
Thanks for a great framework!
EDIT: Removed faulty conclusions previously added. Calling cache.destroy() did not solve the issue.
This was an issue with the application code, not with Phaser at all. Sorry about that, guys!