From: Joe Wreschnig Date: Sun, 2 Aug 2015 11:58:02 +0000 (+0200) Subject: Display more information about decoding errors. X-Git-Url: https://git.yukkurigames.com/?p=pwl6.git;a=commitdiff_plain;h=77894cae974e5d2912a0451cac6c603f8656681f;hp=5deeff54e19003703e7ffb3ee1d3406c3092ebf9 Display more information about decoding errors. --- diff --git a/src/yuu/audio.js b/src/yuu/audio.js index cc00cf7..6b971a1 100644 --- a/src/yuu/audio.js +++ b/src/yuu/audio.js @@ -97,9 +97,10 @@ return new Promise(function (resolve, reject) { ctx.decodeAudioData(data, function (buffer) { resolve(buffer); - }, function () { + }, function (err) { reject(new Error("Error decoding audio buffer" - + (hint ? ": " + hint : ""))); + + (hint ? ": " + hint : "") + + ": " + err.toString())); }); }); }