aboutsummaryrefslogtreecommitdiff
path: root/src/library_openal.js
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan.akhgari@gmail.com>2013-03-13 17:20:10 -0400
committerAlon Zakai <alonzakai@gmail.com>2013-03-15 11:53:15 -0700
commit3a7d1713f196442174204b58b2650a1bc3942630 (patch)
treeec34536abd8ea77a66b5c1649abbcfa969c4f11e /src/library_openal.js
parent316e63d84eda32cf99e62dc9d02de6e287ca8761 (diff)
Add a panner node to the graph
Diffstat (limited to 'src/library_openal.js')
-rw-r--r--src/library_openal.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/library_openal.js b/src/library_openal.js
index 9b2fde54..2e2061ca 100644
--- a/src/library_openal.js
+++ b/src/library_openal.js
@@ -84,9 +84,11 @@ var LibraryOpenAL = {
for (var i = 0; i < count; ++i) {
var src = AL.currentContext.ctx.createBufferSource();
var gain = AL.currentContext.ctx.createGain();
+ var panner = AL.currentContext.ctx.createPanner();
src.connect(gain);
- gain.connect(AL.currentContext.destination);
- AL.currentContext.src.push({src: src, gain: gain});
+ gain.connect(panner);
+ panner.connect(AL.currentContext.destination);
+ AL.currentContext.src.push({src: src, gain: gain, panner: panner});
{{{ makeSetValue('sources', 'i', 'AL.currentContext.src.length - 1', 'i32') }}};
}
},