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
881924e
..
7a66e70
100644
(file)
--- 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
/* 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 http
s
://www.gnu.org/licenses/gpl-2.0.html
+ @source: http
s
://yukkurigames.com/yuu/
*/
(function (yuu) {
*/
(function (yuu) {
@@
-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;