aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-07-03 03:34:40 -0700
committerChris Robinson <[email protected]>2011-07-03 03:34:40 -0700
commit30e97d5223397fcfe6ce203a8cafc6c017088d66 (patch)
tree6d2cce85492f43b4f957438abe1facc4752d1276 /Alc
parent69be02c0fdba3cda8319a6299de1d45b5c695735 (diff)
Read the RoomRolloffFactor property with the other properties
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c18
1 files changed, 9 insertions, 9 deletions
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)
{