aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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') }}};
}
},