Wrapped the decodeAudio in a try/catch.

This commit is contained in:
photonstorm 2015-05-14 23:21:19 +01:00
parent b91387c9a6
commit 4cd374691a

View file

@ -395,17 +395,20 @@ Phaser.SoundManager.prototype = {
{
this.game.cache.updateSound(key, 'isDecoding', true);
var that = this;
var _this = this;
try {
this.context.decodeAudioData(soundData, function (buffer) {
if (buffer)
{
that.game.cache.decodedSound(key, buffer);
that.onSoundDecode.dispatch(key, sound);
_this.game.cache.decodedSound(key, buffer);
_this.onSoundDecode.dispatch(key, sound);
}
});
}
catch (e) {}
}
}
},