mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
Set reverb density based on the environment size
This commit is contained in:
parent
1aaaac900d
commit
d43226631d
1 changed files with 2 additions and 0 deletions
|
@ -1840,6 +1840,7 @@ void OpenALSoundRenderer::LoadReverb(const ReverbContainer *env)
|
|||
#undef SETPARAM
|
||||
#define SETPARAM(e,t,v) alEffectf((e), AL_EAXREVERB_##t, clamp((v), AL_EAXREVERB_MIN_##t, AL_EAXREVERB_MAX_##t))
|
||||
SETPARAM(*envReverb, DIFFUSION, props.EnvDiffusion);
|
||||
SETPARAM(*envReverb, DENSITY, powf(props.EnvSize, 3.0f) * 0.0625f);
|
||||
SETPARAM(*envReverb, GAIN, mB2Gain(props.Room));
|
||||
SETPARAM(*envReverb, GAINHF, mB2Gain(props.RoomHF));
|
||||
SETPARAM(*envReverb, GAINLF, mB2Gain(props.RoomLF));
|
||||
|
@ -1868,6 +1869,7 @@ void OpenALSoundRenderer::LoadReverb(const ReverbContainer *env)
|
|||
{
|
||||
#define SETPARAM(e,t,v) alEffectf((e), AL_REVERB_##t, clamp((v), AL_REVERB_MIN_##t, AL_REVERB_MAX_##t))
|
||||
SETPARAM(*envReverb, DIFFUSION, props.EnvDiffusion);
|
||||
SETPARAM(*envReverb, DENSITY, powf(props.EnvSize, 3.0f) * 0.0625f);
|
||||
SETPARAM(*envReverb, GAIN, mB2Gain(props.Room));
|
||||
SETPARAM(*envReverb, GAINHF, mB2Gain(props.RoomHF));
|
||||
SETPARAM(*envReverb, DECAY_TIME, props.DecayTime);
|
||||
|
|
Loading…
Reference in a new issue