Sound output gain now controls listener gain instead of source gain. Fixes gain control when using OpenAL Soft.
This commit is contained in:
parent
d75a973bf6
commit
d28cdb49e7
1 changed files with 2 additions and 2 deletions
|
|
@ -183,7 +183,7 @@ void givealbuffer(int32_t *buf)
|
|||
ALuint buffer;
|
||||
double gain = pow(10.0, (double)sound_gain / 20.0);
|
||||
|
||||
alSourcef(source[0], AL_GAIN, gain);
|
||||
alListenerf(AL_GAIN, gain);
|
||||
|
||||
alSourceUnqueueBuffers(source[0], 1, &buffer);
|
||||
// printf("U ");
|
||||
|
|
@ -250,7 +250,7 @@ void givealbuffer_cd(int16_t *buf)
|
|||
ALuint buffer;
|
||||
double gain = pow(10.0, (double)sound_gain / 20.0);
|
||||
|
||||
alSourcef(source[1], AL_GAIN, gain);
|
||||
alListenerf(AL_GAIN, gain);
|
||||
|
||||
alSourceUnqueueBuffers(source[1], 1, &buffer);
|
||||
// printf("U ");
|
||||
|
|
|
|||
Loading…
Reference in a new issue