aboutsummaryrefslogtreecommitdiffstats
path: root/al/effects/modulator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'al/effects/modulator.cpp')
-rw-r--r--al/effects/modulator.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/al/effects/modulator.cpp b/al/effects/modulator.cpp
index 8bab41c9..d0a2df02 100644
--- a/al/effects/modulator.cpp
+++ b/al/effects/modulator.cpp
@@ -203,9 +203,9 @@ template<>
throw Exception{message};
}
-bool EaxModulatorCommitter::commit(const EaxEffectProps &props)
+bool EaxModulatorCommitter::commit(const EAXRINGMODULATORPROPERTIES &props)
{
- if(props == mEaxProps)
+ if(auto *cur = std::get_if<EAXRINGMODULATORPROPERTIES>(&mEaxProps); cur && *cur == props)
return false;
mEaxProps = props;
@@ -221,10 +221,9 @@ bool EaxModulatorCommitter::commit(const EaxEffectProps &props)
return ModulatorWaveform::Sinusoid;
};
- auto &eaxprops = std::get<EAXRINGMODULATORPROPERTIES>(props);
- mAlProps.Modulator.Frequency = eaxprops.flFrequency;
- mAlProps.Modulator.HighPassCutoff = eaxprops.flHighPassCutOff;
- mAlProps.Modulator.Waveform = get_waveform(eaxprops.ulWaveform);
+ mAlProps.Modulator.Frequency = props.flFrequency;
+ mAlProps.Modulator.HighPassCutoff = props.flHighPassCutOff;
+ mAlProps.Modulator.Waveform = get_waveform(props.ulWaveform);
return true;
}
@@ -242,9 +241,8 @@ void EaxModulatorCommitter::SetDefaults(EaxEffectProps &props)
props = defprops;
}
-void EaxModulatorCommitter::Get(const EaxCall &call, const EaxEffectProps &props_)
+void EaxModulatorCommitter::Get(const EaxCall &call, const EAXRINGMODULATORPROPERTIES &props)
{
- auto &props = std::get<EAXRINGMODULATORPROPERTIES>(props_);
switch(call.get_property_id())
{
case EAXRINGMODULATOR_NONE: break;
@@ -256,10 +254,9 @@ void EaxModulatorCommitter::Get(const EaxCall &call, const EaxEffectProps &props
}
}
-void EaxModulatorCommitter::Set(const EaxCall &call, EaxEffectProps &props_)
+void EaxModulatorCommitter::Set(const EaxCall &call, EAXRINGMODULATORPROPERTIES &props)
{
- auto &props = std::get<EAXRINGMODULATORPROPERTIES>(props_);
- switch (call.get_property_id())
+ switch(call.get_property_id())
{
case EAXRINGMODULATOR_NONE: break;
case EAXRINGMODULATOR_ALLPARAMETERS: defer<AllValidator>(call, props); break;