From 77894cae974e5d2912a0451cac6c603f8656681f Mon Sep 17 00:00:00 2001 From: Joe Wreschnig Date: Sun, 2 Aug 2015 13:58:02 +0200 Subject: [PATCH] Display more information about decoding errors. --- src/yuu/audio.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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())); }); }); } -- 2.30.2