Skip to content

Commit 266b0b8

Browse files
committed
Merge pull request #4091 from TannerRogalsky/openal_global_gain_bugs
OpenAL global gain bug fixes.
2 parents b8cf39d + d614b5c commit 266b0b8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,5 @@ a license to everyone to use it as detailed in LICENSE.)
231231
* Noam T.Cohen <[email protected]>
232232
* Nick Shin <[email protected]>
233233
* Gregg Tavares <[email protected]>
234+
* Tanner Rogalsky <[email protected]>
234235

src/library_openal.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ var LibraryOpenAL = {
472472
// Disconnect from the panner.
473473
src.gain.disconnect();
474474

475-
src.gain.connect(AL.currentContext.ctx.destination);
475+
src.gain.connect(AL.currentContext.gain);
476476
}
477477
} else if (value === 0 /* AL_FALSE */) {
478478
if (!src.panner) {
@@ -484,7 +484,7 @@ var LibraryOpenAL = {
484484
panner.rolloffFactor = src.rolloffFactor;
485485
panner.setPosition(src.position[0], src.position[1], src.position[2]);
486486
panner.setVelocity(src.velocity[0], src.velocity[1], src.velocity[2]);
487-
panner.connect(AL.currentContext.ctx.destination);
487+
panner.connect(AL.currentContext.gain);
488488

489489
// Disconnect from the default source.
490490
src.gain.disconnect();
@@ -1169,7 +1169,7 @@ var LibraryOpenAL = {
11691169
}
11701170
},
11711171

1172-
alGetListenerf: function(pname, values) {
1172+
alGetListenerf: function(pname, value) {
11731173
if (!AL.currentContext) {
11741174
#if OPENAL_DEBUG
11751175
console.error("alGetListenerf called without a valid context");
@@ -1178,7 +1178,7 @@ var LibraryOpenAL = {
11781178
}
11791179
switch (pname) {
11801180
case 0x100A /* AL_GAIN */:
1181-
{{{ makeSetValue('value', '0', 'AL.currentContext.gain.gain', 'float') }}}
1181+
{{{ makeSetValue('value', '0', 'AL.currentContext.gain.gain.value', 'float') }}}
11821182
break;
11831183
default:
11841184
#if OPENAL_DEBUG

0 commit comments

Comments
 (0)