diff options
author | Chris Robinson <[email protected]> | 2023-03-11 17:03:51 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-03-11 17:03:51 -0800 |
commit | 86d4a77e62857205586caf95580980f29e06eb9f (patch) | |
tree | 108359e7f948fdba9a0bd825f6c67eabccb1fe06 /al/effects/equalizer.cpp | |
parent | 028e7eff52a4d0b7b7c023832d2792bb56fef0d1 (diff) |
Rename some struct members for clarity
Diffstat (limited to 'al/effects/equalizer.cpp')
-rw-r--r-- | al/effects/equalizer.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
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<float>(props_.mEqualizer.lLowGain)); - al_effect_props_.Equalizer.LowCutoff = props_.mEqualizer.flLowCutOff; - al_effect_props_.Equalizer.Mid1Gain = level_mb_to_gain(static_cast<float>(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<float>(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<float>(props_.mEqualizer.lHighGain)); - al_effect_props_.Equalizer.HighCutoff = props_.mEqualizer.flHighCutOff; + mAlProps.Equalizer.LowGain = level_mb_to_gain(static_cast<float>(mEaxProps.mEqualizer.lLowGain)); + mAlProps.Equalizer.LowCutoff = mEaxProps.mEqualizer.flLowCutOff; + mAlProps.Equalizer.Mid1Gain = level_mb_to_gain(static_cast<float>(mEaxProps.mEqualizer.lMid1Gain)); + mAlProps.Equalizer.Mid1Center = mEaxProps.mEqualizer.flMid1Center; + mAlProps.Equalizer.Mid1Width = mEaxProps.mEqualizer.flMid1Width; + mAlProps.Equalizer.Mid2Gain = level_mb_to_gain(static_cast<float>(mEaxProps.mEqualizer.lMid2Gain)); + mAlProps.Equalizer.Mid2Center = mEaxProps.mEqualizer.flMid2Center; + mAlProps.Equalizer.Mid2Width = mEaxProps.mEqualizer.flMid2Width; + mAlProps.Equalizer.HighGain = level_mb_to_gain(static_cast<float>(mEaxProps.mEqualizer.lHighGain)); + mAlProps.Equalizer.HighCutoff = mEaxProps.mEqualizer.flHighCutOff; return true; } |