projects
/
pwl6.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
499e74b
)
Assume createBufferSource got a sample if not a string.
author
Joe Wreschnig
<joe.wreschnig@gmail.com>
Fri, 24 Apr 2015 22:29:35 +0000
(
00:29
+0200)
committer
Joe Wreschnig
<joe.wreschnig@gmail.com>
Fri, 24 Apr 2015 22:29:35 +0000
(
00:29
+0200)
src/yuu/audio.js
patch
|
blob
|
history
diff --git
a/src/yuu/audio.js
b/src/yuu/audio.js
index fb352aeb9a7686beb2e4d924ab030eadc3c66cac..7a66e708e920c10367758522af2c1eead5e25d74 100644
(file)
--- 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;