diff options
author | Chris Robinson <[email protected]> | 2011-07-05 04:36:41 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-07-05 04:36:41 -0700 |
commit | c8d385c998781e5fd12145fce871d7042aa9c686 (patch) | |
tree | 46601d4e6e3a381313cde3b37d1d7099946319f4 /Alc | |
parent | 4c35bfbc10ec58828b1c83c88d53721dcd49eb32 (diff) |
Use a helper to tell if an effect type is reverb
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALu.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -404,9 +404,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) for(i = 0;i < NumSends;i++) { RoomRolloff[i] = Rolloff; - if(ALSource->Send[i].Slot && - (ALSource->Send[i].Slot->effect.type == AL_EFFECT_REVERB || - ALSource->Send[i].Slot->effect.type == AL_EFFECT_EAXREVERB)) + if(ALSource->Send[i].Slot && IsReverbEffect(ALSource->Send[i].Slot->effect.type)) RoomRolloff[i] += ALSource->Send[i].Slot->effect.Params.Reverb.RoomRolloffFactor; } MinDist = ALSource->flRefDistance; @@ -580,8 +578,7 @@ ALvoid CalcSourceParams(ALsource *ALSource, const ALCcontext *ALContext) WetGain[i] = __min(WetGain[i],MaxVolume); WetGain[i] = __max(WetGain[i],MinVolume); - if(Slot->effect.type == AL_EFFECT_REVERB || - Slot->effect.type == AL_EFFECT_EAXREVERB) + if(IsReverbEffect(Slot->effect.type)) { /* Apply a decay-time transformation to the wet path, based on * the attenuation of the dry path. |