X-Git-Url: https://git.yukkurigames.com/?p=pwl6.git;a=blobdiff_plain;f=src%2Fyuu%2Faudio.js;h=7a66e708e920c10367758522af2c1eead5e25d74;hp=881924ee58ff4c8fe85cf0b6071a8c8827a740b4;hb=299c9a8900ae7a4b8289db0dedc768a48e2856e3;hpb=d2962105772fbdc548118bd65cd5bb4934e66085 diff --git a/src/yuu/audio.js b/src/yuu/audio.js index 881924e..7a66e70 100644 --- a/src/yuu/audio.js +++ b/src/yuu/audio.js @@ -1,7 +1,7 @@ /* Copyright 2014 Yukkuri Games Licensed under the terms of the GNU GPL v2 or later - @license http://www.gnu.org/licenses/gpl-2.0.html - @source: http://yukkurigames.com/yuu/ + @license https://www.gnu.org/licenses/gpl-2.0.html + @source: https://yukkurigames.com/yuu/ */ (function (yuu) { @@ -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;