X-Git-Url: https://git.yukkurigames.com/?p=pwl6.git;a=blobdiff_plain;f=src%2Fyuu%2Faudio.js;fp=src%2Fyuu%2Faudio.js;h=7a66e708e920c10367758522af2c1eead5e25d74;hp=fb352aeb9a7686beb2e4d924ab030eadc3c66cac;hb=299c9a8900ae7a4b8289db0dedc768a48e2856e3;hpb=499e74b37d701e1beb46fec4067a06044bdc76bf diff --git a/src/yuu/audio.js b/src/yuu/audio.js index fb352ae..7a66e70 100644 --- a/src/yuu/audio.js +++ b/src/yuu/audio.js @@ -107,7 +107,9 @@ createBufferSource: function (path) { var source = this._ctx.createBufferSource(); - var sample = new yuu.AudioSample(path, this); + var sample = yf.isString(path) + ? new yuu.AudioSample(path, this) + : path; if ((source.buffer = sample.buffer) === null) { sample.ready.then(function () { source.buffer = sample.buffer;