projects
/
pwl6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Assume createBufferSource got a sample if not a string.
[pwl6.git]
/
src
/
yuu
/
audio.js
diff --git
a/src/yuu/audio.js
b/src/yuu/audio.js
index
fb352ae
..
7a66e70
100644
(file)
--- a/
src/yuu/audio.js
+++ b/
src/yuu/audio.js
@@
-107,7
+107,9
@@
createBufferSource: function (path) {
var source = this._ctx.createBufferSource();
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;
if ((source.buffer = sample.buffer) === null) {
sample.ready.then(function () {
source.buffer = sample.buffer;