From 30e97d5223397fcfe6ce203a8cafc6c017088d66 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 3 Jul 2011 03:34:40 -0700 Subject: Read the RoomRolloffFactor property with the other properties --- Alc/ALu.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'Alc') diff --git a/Alc/ALu.c b/Alc/ALu.c index aa574b38..80fdb7db 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -412,6 +412,15 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) WetGainAuto = ALSource->WetGainAuto; WetGainHFAuto = ALSource->WetGainHFAuto; AirAbsorptionFactor = ALSource->AirAbsorptionFactor; + for(i = 0;i < NumSends;i++) + { + RoomRolloff[i] = ((i==0) ? ALSource->RoomRolloffFactor : + RoomRolloff[i-1]); + if(ALSource->Send[i].Slot && + (ALSource->Send[i].Slot->effect.type == AL_EFFECT_REVERB || + ALSource->Send[i].Slot->effect.type == AL_EFFECT_EAXREVERB)) + RoomRolloff[i] += ALSource->Send[i].Slot->effect.Params.Reverb.RoomRolloffFactor; + } //1. Translate Listener to origin (convert to head relative) if(ALSource->bHeadRelative == AL_FALSE) @@ -458,16 +467,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) Attenuation = 1.0f; for(i = 0;i < NumSends;i++) - { RoomAttenuation[i] = 1.0f; - - RoomRolloff[i] = ALSource->RoomRolloffFactor; - if(ALSource->Send[i].Slot && - (ALSource->Send[i].Slot->effect.type == AL_EFFECT_REVERB || - ALSource->Send[i].Slot->effect.type == AL_EFFECT_EAXREVERB)) - RoomRolloff[i] += ALSource->Send[i].Slot->effect.Params.Reverb.RoomRolloffFactor; - } - switch(ALContext->SourceDistanceModel ? ALSource->DistanceModel : ALContext->DistanceModel) { -- cgit v1.2.3