diff options
Diffstat (limited to 'al/effects/modulator.cpp')
-rw-r--r-- | al/effects/modulator.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/al/effects/modulator.cpp b/al/effects/modulator.cpp index 8b6b1045..5f37d08f 100644 --- a/al/effects/modulator.cpp +++ b/al/effects/modulator.cpp @@ -206,15 +206,14 @@ template<> template<> bool ModulatorCommitter::commit(const EaxEffectProps &props) { - const auto orig = mEaxProps; - mEaxProps = props; - - if(orig.mType == mEaxProps.mType + if(props.mType == mEaxProps.mType && mEaxProps.mModulator.flFrequency == props.mModulator.flFrequency && mEaxProps.mModulator.flHighPassCutOff == props.mModulator.flHighPassCutOff && mEaxProps.mModulator.ulWaveform == props.mModulator.ulWaveform) return false; + mEaxProps = props; + auto get_waveform = [](unsigned long form) { if(form == EAX_RINGMODULATOR_SINUSOID) @@ -226,9 +225,9 @@ bool ModulatorCommitter::commit(const EaxEffectProps &props) return ModulatorWaveform::Sinusoid; }; - mAlProps.Modulator.Frequency = mEaxProps.mModulator.flFrequency; - mAlProps.Modulator.HighPassCutoff = mEaxProps.mModulator.flHighPassCutOff; - mAlProps.Modulator.Waveform = get_waveform(mEaxProps.mModulator.ulWaveform); + mAlProps.Modulator.Frequency = props.mModulator.flFrequency; + mAlProps.Modulator.HighPassCutoff = props.mModulator.flHighPassCutOff; + mAlProps.Modulator.Waveform = get_waveform(props.mModulator.ulWaveform); return true; } |