diff options
Diffstat (limited to 'al/effects/fshifter.cpp')
-rw-r--r-- | al/effects/fshifter.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/al/effects/fshifter.cpp b/al/effects/fshifter.cpp index 45253563..a6b3c86c 100644 --- a/al/effects/fshifter.cpp +++ b/al/effects/fshifter.cpp @@ -197,9 +197,9 @@ template<> throw Exception{message}; } -bool EaxFrequencyShifterCommitter::commit(const EaxEffectProps &props) +bool EaxFrequencyShifterCommitter::commit(const EAXFREQUENCYSHIFTERPROPERTIES &props) { - if(props == mEaxProps) + if(auto *cur = std::get_if<EAXFREQUENCYSHIFTERPROPERTIES>(&mEaxProps); cur && *cur == props) return false; mEaxProps = props; @@ -213,10 +213,9 @@ bool EaxFrequencyShifterCommitter::commit(const EaxEffectProps &props) return FShifterDirection::Off; }; - auto &eaxprops = std::get<EAXFREQUENCYSHIFTERPROPERTIES>(props); - mAlProps.Fshifter.Frequency = eaxprops.flFrequency; - mAlProps.Fshifter.LeftDirection = get_direction(eaxprops.ulLeftDirection); - mAlProps.Fshifter.RightDirection = get_direction(eaxprops.ulRightDirection); + mAlProps.Fshifter.Frequency = props.flFrequency; + mAlProps.Fshifter.LeftDirection = get_direction(props.ulLeftDirection); + mAlProps.Fshifter.RightDirection = get_direction(props.ulRightDirection); return true; } @@ -234,9 +233,8 @@ void EaxFrequencyShifterCommitter::SetDefaults(EaxEffectProps &props) props = defprops; } -void EaxFrequencyShifterCommitter::Get(const EaxCall &call, const EaxEffectProps &props_) +void EaxFrequencyShifterCommitter::Get(const EaxCall &call, const EAXFREQUENCYSHIFTERPROPERTIES &props) { - auto &props = std::get<EAXFREQUENCYSHIFTERPROPERTIES>(props_); switch(call.get_property_id()) { case EAXFREQUENCYSHIFTER_NONE: break; @@ -248,9 +246,8 @@ void EaxFrequencyShifterCommitter::Get(const EaxCall &call, const EaxEffectProps } } -void EaxFrequencyShifterCommitter::Set(const EaxCall &call, EaxEffectProps &props_) +void EaxFrequencyShifterCommitter::Set(const EaxCall &call, EAXFREQUENCYSHIFTERPROPERTIES &props) { - auto &props = std::get<EAXFREQUENCYSHIFTERPROPERTIES>(props_); switch(call.get_property_id()) { case EAXFREQUENCYSHIFTER_NONE: break; |