/* 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) {
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;