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;