diff options
Diffstat (limited to 'al/effects/fshifter.cpp')
-rw-r--r-- | al/effects/fshifter.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/al/effects/fshifter.cpp b/al/effects/fshifter.cpp index 983e83ee..949db203 100644 --- a/al/effects/fshifter.cpp +++ b/al/effects/fshifter.cpp @@ -200,15 +200,14 @@ template<> template<> bool FrequencyShifterCommitter::commit(const EaxEffectProps &props) { - const auto orig = mEaxProps; - mEaxProps = props; - - if(orig.mType == mEaxProps.mType + if(props.mType == mEaxProps.mType && mEaxProps.mFrequencyShifter.flFrequency == props.mFrequencyShifter.flFrequency && mEaxProps.mFrequencyShifter.ulLeftDirection == props.mFrequencyShifter.ulLeftDirection && mEaxProps.mFrequencyShifter.ulRightDirection == props.mFrequencyShifter.ulRightDirection) return false; + mEaxProps = props; + auto get_direction = [](unsigned long dir) noexcept { if(dir == EAX_FREQUENCYSHIFTER_DOWN) @@ -218,9 +217,9 @@ bool FrequencyShifterCommitter::commit(const EaxEffectProps &props) return FShifterDirection::Off; }; - mAlProps.Fshifter.Frequency = mEaxProps.mFrequencyShifter.flFrequency; - mAlProps.Fshifter.LeftDirection = get_direction(mEaxProps.mFrequencyShifter.ulLeftDirection); - mAlProps.Fshifter.RightDirection = get_direction(mEaxProps.mFrequencyShifter.ulRightDirection); + mAlProps.Fshifter.Frequency = props.mFrequencyShifter.flFrequency; + mAlProps.Fshifter.LeftDirection = get_direction(props.mFrequencyShifter.ulLeftDirection); + mAlProps.Fshifter.RightDirection = get_direction(props.mFrequencyShifter.ulRightDirection); return true; } |