From b2f9430fb15fe4c95f9faf73e74c60338e04f622 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 22 Jun 2014 19:38:47 -0700 Subject: [PATCH] Use the correct diffusion value for reverb I don't know what the Density and Diffusion values correspond to, but EnvDiffusion is the actual diffusion setting. --- src/sound/oalsound.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/sound/oalsound.cpp b/src/sound/oalsound.cpp index 1930a8346..0353b17bb 100644 --- a/src/sound/oalsound.cpp +++ b/src/sound/oalsound.cpp @@ -1797,8 +1797,7 @@ void OpenALSoundRenderer::LoadReverb(const ReverbContainer *env) props.ReverbPan2 }; #undef SETPARAM #define SETPARAM(e,t,v) alEffectf((e), AL_EAXREVERB_##t, clamp((v), AL_EAXREVERB_MIN_##t, AL_EAXREVERB_MAX_##t)) - SETPARAM(envReverb, DENSITY, props.Density/100.f); - SETPARAM(envReverb, DIFFUSION, props.Diffusion/100.f); + SETPARAM(envReverb, DIFFUSION, props.EnvDiffusion); SETPARAM(envReverb, GAIN, mB2Gain(props.Room)); SETPARAM(envReverb, GAINHF, mB2Gain(props.RoomHF)); SETPARAM(envReverb, GAINLF, mB2Gain(props.RoomLF)); @@ -1826,8 +1825,7 @@ void OpenALSoundRenderer::LoadReverb(const ReverbContainer *env) else if(type == AL_EFFECT_REVERB) { #define SETPARAM(e,t,v) alEffectf((e), AL_REVERB_##t, clamp((v), AL_REVERB_MIN_##t, AL_REVERB_MAX_##t)) - SETPARAM(envReverb, DENSITY, props.Density/100.f); - SETPARAM(envReverb, DIFFUSION, props.Diffusion/100.f); + SETPARAM(envReverb, DIFFUSION, props.EnvDiffusion); SETPARAM(envReverb, GAIN, mB2Gain(props.Room)); SETPARAM(envReverb, GAINHF, mB2Gain(props.RoomHF)); SETPARAM(envReverb, DECAY_TIME, props.DecayTime);