From 86d4a77e62857205586caf95580980f29e06eb9f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 11 Mar 2023 17:03:51 -0800 Subject: Rename some struct members for clarity --- al/effects/equalizer.cpp | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'al/effects/equalizer.cpp') diff --git a/al/effects/equalizer.cpp b/al/effects/equalizer.cpp index 2ef048f9..5eea9e6d 100644 --- a/al/effects/equalizer.cpp +++ b/al/effects/equalizer.cpp @@ -322,31 +322,31 @@ template<> template<> bool EqualizerCommitter::commit(const EaxEffectProps &props) { - const auto orig = props_; - props_ = props; - - if(orig.mType == props_.mType && props_.mEqualizer.lLowGain == props.mEqualizer.lLowGain - && props_.mEqualizer.flLowCutOff == props.mEqualizer.flLowCutOff - && props_.mEqualizer.lMid1Gain == props.mEqualizer.lMid1Gain - && props_.mEqualizer.flMid1Center == props.mEqualizer.flMid1Center - && props_.mEqualizer.flMid1Width == props.mEqualizer.flMid1Width - && props_.mEqualizer.lMid2Gain == props.mEqualizer.lMid2Gain - && props_.mEqualizer.flMid2Center == props.mEqualizer.flMid2Center - && props_.mEqualizer.flMid2Width == props.mEqualizer.flMid2Width - && props_.mEqualizer.lHighGain == props.mEqualizer.lHighGain - && props_.mEqualizer.flHighCutOff == props.mEqualizer.flHighCutOff) + const auto orig = mEaxProps; + mEaxProps = props; + + if(orig.mType == mEaxProps.mType && mEaxProps.mEqualizer.lLowGain == props.mEqualizer.lLowGain + && mEaxProps.mEqualizer.flLowCutOff == props.mEqualizer.flLowCutOff + && mEaxProps.mEqualizer.lMid1Gain == props.mEqualizer.lMid1Gain + && mEaxProps.mEqualizer.flMid1Center == props.mEqualizer.flMid1Center + && mEaxProps.mEqualizer.flMid1Width == props.mEqualizer.flMid1Width + && mEaxProps.mEqualizer.lMid2Gain == props.mEqualizer.lMid2Gain + && mEaxProps.mEqualizer.flMid2Center == props.mEqualizer.flMid2Center + && mEaxProps.mEqualizer.flMid2Width == props.mEqualizer.flMid2Width + && mEaxProps.mEqualizer.lHighGain == props.mEqualizer.lHighGain + && mEaxProps.mEqualizer.flHighCutOff == props.mEqualizer.flHighCutOff) return false; - al_effect_props_.Equalizer.LowGain = level_mb_to_gain(static_cast(props_.mEqualizer.lLowGain)); - al_effect_props_.Equalizer.LowCutoff = props_.mEqualizer.flLowCutOff; - al_effect_props_.Equalizer.Mid1Gain = level_mb_to_gain(static_cast(props_.mEqualizer.lMid1Gain)); - al_effect_props_.Equalizer.Mid1Center = props_.mEqualizer.flMid1Center; - al_effect_props_.Equalizer.Mid1Width = props_.mEqualizer.flMid1Width; - al_effect_props_.Equalizer.Mid2Gain = level_mb_to_gain(static_cast(props_.mEqualizer.lMid2Gain)); - al_effect_props_.Equalizer.Mid2Center = props_.mEqualizer.flMid2Center; - al_effect_props_.Equalizer.Mid2Width = props_.mEqualizer.flMid2Width; - al_effect_props_.Equalizer.HighGain = level_mb_to_gain(static_cast(props_.mEqualizer.lHighGain)); - al_effect_props_.Equalizer.HighCutoff = props_.mEqualizer.flHighCutOff; + mAlProps.Equalizer.LowGain = level_mb_to_gain(static_cast(mEaxProps.mEqualizer.lLowGain)); + mAlProps.Equalizer.LowCutoff = mEaxProps.mEqualizer.flLowCutOff; + mAlProps.Equalizer.Mid1Gain = level_mb_to_gain(static_cast(mEaxProps.mEqualizer.lMid1Gain)); + mAlProps.Equalizer.Mid1Center = mEaxProps.mEqualizer.flMid1Center; + mAlProps.Equalizer.Mid1Width = mEaxProps.mEqualizer.flMid1Width; + mAlProps.Equalizer.Mid2Gain = level_mb_to_gain(static_cast(mEaxProps.mEqualizer.lMid2Gain)); + mAlProps.Equalizer.Mid2Center = mEaxProps.mEqualizer.flMid2Center; + mAlProps.Equalizer.Mid2Width = mEaxProps.mEqualizer.flMid2Width; + mAlProps.Equalizer.HighGain = level_mb_to_gain(static_cast(mEaxProps.mEqualizer.lHighGain)); + mAlProps.Equalizer.HighCutoff = mEaxProps.mEqualizer.flHighCutOff; return true; } -- cgit v1.2.3