[openal] Attenuation Roll-Off problems (too silent)

Chris Robinson chris.kcat at gmail.com
Sat May 21 08:34:40 EDT 2022


On Saturday, May 21, 2022 5:12:59 AM PDT Roland Pl├╝ss wrote:
> This does not seem to work. I tested with reverb gain of 0.02 once with 
> source gain 10, 100 and 1000 but the final reverb gain is unchanged. 
> This leads me to conclude reverb gain is not linked with source gain. Is 
> this wrong?

The source gain is clamped before the reverb gain is applied. With no 
attenuation, it's essentially:

mix_gain = clamp(source.gain, source.min_gain, source.max_gain) *
    source.filter.gain * listener.gain * reverb.gain;

The sound is then mixed to the effect buffer with that gain, then the effect 
processes its buffer when all sources have mixed to it.




More information about the openal mailing list