aboutsummaryrefslogtreecommitdiffstats
path: root/al/effects/compressor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'al/effects/compressor.cpp')
-rw-r--r--al/effects/compressor.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/al/effects/compressor.cpp b/al/effects/compressor.cpp
index 6dc96a20..9c4308f4 100644
--- a/al/effects/compressor.cpp
+++ b/al/effects/compressor.cpp
@@ -115,14 +115,14 @@ template<>
throw Exception{message};
}
-bool EaxCompressorCommitter::commit(const EaxEffectProps &props)
+bool EaxCompressorCommitter::commit(const EAXAGCCOMPRESSORPROPERTIES &props)
{
- if(props == mEaxProps)
+ if(auto *cur = std::get_if<EAXAGCCOMPRESSORPROPERTIES>(&mEaxProps); cur && *cur == props)
return false;
mEaxProps = props;
- mAlProps.Compressor.OnOff = (std::get<EAXAGCCOMPRESSORPROPERTIES>(props).ulOnOff != 0);
+ mAlProps.Compressor.OnOff = props.ulOnOff != 0;
return true;
}
@@ -131,9 +131,8 @@ void EaxCompressorCommitter::SetDefaults(EaxEffectProps &props)
props = EAXAGCCOMPRESSORPROPERTIES{EAXAGCCOMPRESSOR_DEFAULTONOFF};
}
-void EaxCompressorCommitter::Get(const EaxCall &call, const EaxEffectProps &props_)
+void EaxCompressorCommitter::Get(const EaxCall &call, const EAXAGCCOMPRESSORPROPERTIES &props)
{
- auto &props = std::get<EAXAGCCOMPRESSORPROPERTIES>(props_);
switch(call.get_property_id())
{
case EAXAGCCOMPRESSOR_NONE: break;
@@ -143,9 +142,8 @@ void EaxCompressorCommitter::Get(const EaxCall &call, const EaxEffectProps &prop
}
}
-void EaxCompressorCommitter::Set(const EaxCall &call, EaxEffectProps &props_)
+void EaxCompressorCommitter::Set(const EaxCall &call, EAXAGCCOMPRESSORPROPERTIES &props)
{
- auto &props = std::get<EAXAGCCOMPRESSORPROPERTIES>(props_);
switch(call.get_property_id())
{
case EAXAGCCOMPRESSOR_NONE: break;