From dae225e88dbf795e776a2c9f2dbe5bb07c2228b9 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 24 Dec 2023 02:48:20 -0800 Subject: Rework effect property handling To nake EffectProps a variant instead of a union, and avoid manual vtables. --- core/effects/base.h | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'core/effects') diff --git a/core/effects/base.h b/core/effects/base.h index 66182bf5..df4eb129 100644 --- a/core/effects/base.h +++ b/core/effects/base.h @@ -2,7 +2,8 @@ #define CORE_EFFECTS_BASE_H #include -#include +#include +#include #include "almalloc.h" #include "alspan.h" @@ -145,7 +146,7 @@ struct EqualizerProps { float HighGain; }; -struct FshiterProps { +struct FshifterProps { float Frequency; FShifterDirection LeftDirection; FShifterDirection RightDirection; @@ -184,23 +185,22 @@ struct ConvolutionProps { std::array OrientUp; }; -union EffectProps { - ReverbProps Reverb; - AutowahProps Autowah; - ChorusProps Chorus; - FlangerProps Flanger; - CompressorProps Compressor; - DistortionProps Distortion; - EchoProps Echo; - EqualizerProps Equalizer; - FshiterProps Fshifter; - ModulatorProps Modulator; - PshifterProps Pshifter; - VmorpherProps Vmorpher; - DedicatedDialogProps DedicatedDialog; - DedicatedLfeProps DedicatedLfe; - ConvolutionProps Convolution; -}; +using EffectProps = std::variant; struct EffectTarget { -- cgit v1.2.3