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.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/al/effects/compressor.cpp b/al/effects/compressor.cpp
index a4aa8e77..ca8af84f 100644
--- a/al/effects/compressor.cpp
+++ b/al/effects/compressor.cpp
@@ -118,43 +118,43 @@ template<>
template<>
bool CompressorCommitter::commit(const EaxEffectProps &props)
{
- if(props.mType == mEaxProps.mType
- && props.mCompressor.ulOnOff == mEaxProps.mCompressor.ulOnOff)
+ if(props == mEaxProps)
return false;
mEaxProps = props;
- mAlProps.Compressor.OnOff = (props.mCompressor.ulOnOff != 0);
+ mAlProps.Compressor.OnOff = (std::get<EAXAGCCOMPRESSORPROPERTIES>(props).ulOnOff != 0);
return true;
}
template<>
void CompressorCommitter::SetDefaults(EaxEffectProps &props)
{
- props.mType = EaxEffectType::Compressor;
- props.mCompressor.ulOnOff = EAXAGCCOMPRESSOR_DEFAULTONOFF;
+ props = EAXAGCCOMPRESSORPROPERTIES{EAXAGCCOMPRESSOR_DEFAULTONOFF};
}
template<>
-void CompressorCommitter::Get(const EaxCall &call, const EaxEffectProps &props)
+void CompressorCommitter::Get(const EaxCall &call, const EaxEffectProps &props_)
{
+ auto &props = std::get<EAXAGCCOMPRESSORPROPERTIES>(props_);
switch(call.get_property_id())
{
case EAXAGCCOMPRESSOR_NONE: break;
- case EAXAGCCOMPRESSOR_ALLPARAMETERS: call.set_value<Exception>(props.mCompressor); break;
- case EAXAGCCOMPRESSOR_ONOFF: call.set_value<Exception>(props.mCompressor.ulOnOff); break;
+ case EAXAGCCOMPRESSOR_ALLPARAMETERS: call.set_value<Exception>(props); break;
+ case EAXAGCCOMPRESSOR_ONOFF: call.set_value<Exception>(props.ulOnOff); break;
default: fail_unknown_property_id();
}
}
template<>
-void CompressorCommitter::Set(const EaxCall &call, EaxEffectProps &props)
+void CompressorCommitter::Set(const EaxCall &call, EaxEffectProps &props_)
{
+ auto &props = std::get<EAXAGCCOMPRESSORPROPERTIES>(props_);
switch(call.get_property_id())
{
case EAXAGCCOMPRESSOR_NONE: break;
- case EAXAGCCOMPRESSOR_ALLPARAMETERS: defer<AllValidator>(call, props.mCompressor); break;
- case EAXAGCCOMPRESSOR_ONOFF: defer<OnOffValidator>(call, props.mCompressor.ulOnOff); break;
+ case EAXAGCCOMPRESSOR_ALLPARAMETERS: defer<AllValidator>(call, props); break;
+ case EAXAGCCOMPRESSOR_ONOFF: defer<OnOffValidator>(call, props.ulOnOff); break;
default: fail_unknown_property_id();
}
}