From e9505b164e6587b1bb0d04b478ddc45033dfbac8 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 27 May 2017 22:33:40 -0700 Subject: Fix source sends' initial HF absorption and decay calculation The HF absorption is applied given the source distance, as relative to the source's immediate environment, with additional absorption being applied given the room/reverb environment. This does double up the amount of absorption compared to the dry path, but it can be assumed the initial reflections travel a longer distance. --- OpenAL32/Include/alAuxEffectSlot.h | 2 +- OpenAL32/alAuxEffectSlot.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenAL32') diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h index 7126f8f5..5be9ae7a 100644 --- a/OpenAL32/Include/alAuxEffectSlot.h +++ b/OpenAL32/Include/alAuxEffectSlot.h @@ -122,8 +122,8 @@ typedef struct ALeffectslot { ALfloat RoomRolloff; /* Added to the source's room rolloff, not multiplied. */ ALfloat DecayTime; ALfloat DecayHFRatio; - ALfloat AirAbsorptionGainHF; ALboolean DecayHFLimit; + ALfloat AirAbsorptionGainHF; } Params; /* Self ID */ diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c index 8a990584..cd2c1e09 100644 --- a/OpenAL32/alAuxEffectSlot.c +++ b/OpenAL32/alAuxEffectSlot.c @@ -616,8 +616,8 @@ ALenum InitEffectSlot(ALeffectslot *slot) slot->Params.RoomRolloff = 0.0f; slot->Params.DecayTime = 0.0f; slot->Params.DecayHFRatio = 0.0f; - slot->Params.AirAbsorptionGainHF = 1.0f; slot->Params.DecayHFLimit = AL_FALSE; + slot->Params.AirAbsorptionGainHF = 1.0f; return AL_NO_ERROR; } -- cgit v1.2.3