File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1250,7 +1250,7 @@ var LibraryOpenAL = {
1250
1250
}
1251
1251
switch ( param ) {
1252
1252
case 0x100A /* AL_GAIN */ :
1253
- AL . currentContext . gain . value = value ;
1253
+ AL . currentContext . gain . gain . value = value ;
1254
1254
break ;
1255
1255
default :
1256
1256
#if OPENAL_DEBUG
Original file line number Diff line number Diff line change @@ -59,6 +59,16 @@ int main() {
59
59
alListenerfv (AL_VELOCITY, listenerVel);
60
60
alListenerfv (AL_ORIENTATION, listenerOri);
61
61
62
+ // check getting and setting global gain
63
+ ALfloat volume;
64
+ alGetListenerf (AL_GAIN, &volume);
65
+ assert (volume == 1.0 );
66
+ alListenerf (AL_GAIN, 0.0 );
67
+ alGetListenerf (AL_GAIN, &volume);
68
+ assert (volume == 0.0 );
69
+
70
+ alListenerf (AL_GAIN, 1.0 ); // reset gain to default
71
+
62
72
ALuint buffers[1 ];
63
73
64
74
alGenBuffers (1 , buffers);
You can’t perform that action at this time.
0 commit comments