diff options
author | Chris Robinson <[email protected]> | 2011-07-03 03:34:40 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-07-03 03:34:40 -0700 |
commit | 30e97d5223397fcfe6ce203a8cafc6c017088d66 (patch) | |
tree | 6d2cce85492f43b4f957438abe1facc4752d1276 /Alc/ALu.c | |
parent | 69be02c0fdba3cda8319a6299de1d45b5c695735 (diff) |
Read the RoomRolloffFactor property with the other properties
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -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) { |