mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 01:38:23 +00:00
Wrapped the decodeAudio in a try/catch.
This commit is contained in:
parent
b91387c9a6
commit
4cd374691a
1 changed files with 11 additions and 8 deletions
|
@ -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) {}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue