diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2023-03-08 22:27:02 +0100 |
---|---|---|
committer | Daniel Schürmann <daschuer@mixxx.org> | 2023-03-08 22:27:02 +0100 |
commit | 227148a163f4105eaaef5a466b0083cb39f4ecd8 (patch) | |
tree | c9d63d2e69e755ea5ecbdee2c38e03408d8eccf3 /src/effects | |
parent | c15f24fad864f548264b342091d3a34dbea0998b (diff) |
Use override and default in EffectStates
Diffstat (limited to 'src/effects')
23 files changed, 27 insertions, 21 deletions
diff --git a/src/effects/backends/builtin/autopaneffect.h b/src/effects/backends/builtin/autopaneffect.h index 9c6d31e0a4..a97a7d9349 100644 --- a/src/effects/backends/builtin/autopaneffect.h +++ b/src/effects/backends/builtin/autopaneffect.h @@ -69,8 +69,8 @@ class AutoPanGroupState : public EffectState { delay = new EngineFilterPanSingle<panMaxDelay>(); m_dPreviousPeriod = -1.0; } - ~AutoPanGroupState() { - } + ~AutoPanGroupState() override = default; + unsigned int time; RampedSample frac; EngineFilterPanSingle<panMaxDelay>* delay; diff --git a/src/effects/backends/builtin/balanceeffect.cpp b/src/effects/backends/builtin/balanceeffect.cpp index 2837d1c77c..cef476d58d 100644 --- a/src/effects/backends/builtin/balanceeffect.cpp +++ b/src/effects/backends/builtin/balanceeffect.cpp @@ -79,9 +79,6 @@ BalanceGroupState::BalanceGroupState(const mixxx::EngineParameters& engineParame m_high->setStartFromDry(true); } -BalanceGroupState::~BalanceGroupState() { -} - void BalanceGroupState::setFilters(int sampleRate, double freq) { m_low->setFrequencyCorners(sampleRate, freq); m_high->setFrequencyCorners(sampleRate, freq); diff --git a/src/effects/backends/builtin/balanceeffect.h b/src/effects/backends/builtin/balanceeffect.h index 9b98687a1a..92c4a6014a 100644 --- a/src/effects/backends/builtin/balanceeffect.h +++ b/src/effects/backends/builtin/balanceeffect.h @@ -10,7 +10,7 @@ class BalanceGroupState : public EffectState { public: BalanceGroupState(const mixxx::EngineParameters& engineParameters); - ~BalanceGroupState(); + ~BalanceGroupState() override = default; void setFilters(int sampleRate, double freq); diff --git a/src/effects/backends/builtin/biquadfullkilleqeffect.h b/src/effects/backends/builtin/biquadfullkilleqeffect.h index 2e2c781c86..795c73386e 100644 --- a/src/effects/backends/builtin/biquadfullkilleqeffect.h +++ b/src/effects/backends/builtin/biquadfullkilleqeffect.h @@ -18,6 +18,7 @@ class BiquadFullKillEQEffectGroupState : public EffectState { public: BiquadFullKillEQEffectGroupState(const mixxx::EngineParameters& engineParameters); + ~BiquadFullKillEQEffectGroupState() override = default; void setFilters( mixxx::audio::SampleRate sampleRate, diff --git a/src/effects/backends/builtin/bitcrushereffect.h b/src/effects/backends/builtin/bitcrushereffect.h index c302cbc376..7ad428411d 100644 --- a/src/effects/backends/builtin/bitcrushereffect.h +++ b/src/effects/backends/builtin/bitcrushereffect.h @@ -16,6 +16,8 @@ struct BitCrusherGroupState : public EffectState { hold_r(0), accumulator(1) { } + ~BitCrusherGroupState() override = default; + CSAMPLE hold_l, hold_r; // Accumulated fractions of a samplerate period. CSAMPLE accumulator; diff --git a/src/effects/backends/builtin/distortioneffect.h b/src/effects/backends/builtin/distortioneffect.h index 93a4dc3ac9..48b0dd50eb 100644 --- a/src/effects/backends/builtin/distortioneffect.h +++ b/src/effects/backends/builtin/distortioneffect.h @@ -11,6 +11,7 @@ class DistortionGroupState : public EffectState { public: DistortionGroupState(const mixxx::EngineParameters& engineParameters); + ~DistortionGroupState() override = default; CSAMPLE_GAIN m_driveGain; CSAMPLE m_crossfadeParameter; diff --git a/src/effects/backends/builtin/echoeffect.h b/src/effects/backends/builtin/echoeffect.h index 735143fbc9..3ac9a24f5b 100644 --- a/src/effects/backends/builtin/echoeffect.h +++ b/src/effects/backends/builtin/echoeffect.h @@ -22,6 +22,7 @@ class EchoGroupState : public EffectState { audioParametersChanged(engineParameters); clear(); } + ~EchoGroupState() override = default; void audioParametersChanged(const mixxx::EngineParameters& engineParameters) { delay_buf = mixxx::SampleBuffer(kMaxDelaySeconds * diff --git a/src/effects/backends/builtin/filtereffect.h b/src/effects/backends/builtin/filtereffect.h index 335b81e011..6ea4eda8c4 100644 --- a/src/effects/backends/builtin/filtereffect.h +++ b/src/effects/backends/builtin/filtereffect.h @@ -12,7 +12,7 @@ struct FilterGroupState : public EffectState { FilterGroupState(const mixxx::EngineParameters& engineParameters); - ~FilterGroupState(); + ~FilterGroupState() override; void setFilters(int sampleRate, double lowFreq, double highFreq); diff --git a/src/effects/backends/builtin/flangereffect.h b/src/effects/backends/builtin/flangereffect.h index cca4c2742a..ad00bb158b 100644 --- a/src/effects/backends/builtin/flangereffect.h +++ b/src/effects/backends/builtin/flangereffect.h @@ -35,6 +35,8 @@ struct FlangerGroupState : public EffectState { SampleUtil::clear(delayLeft, kBufferLenth); SampleUtil::clear(delayRight, kBufferLenth); } + ~FlangerGroupState() override = default; + CSAMPLE delayLeft[kBufferLenth]; CSAMPLE delayRight[kBufferLenth]; unsigned int delayPos; diff --git a/src/effects/backends/builtin/graphiceqeffect.h b/src/effects/backends/builtin/graphiceqeffect.h index 8ded9417a7..c088adcfda 100644 --- a/src/effects/backends/builtin/graphiceqeffect.h +++ b/src/effects/backends/builtin/graphiceqeffect.h @@ -15,7 +15,7 @@ class GraphicEQEffectGroupState : public EffectState { public: GraphicEQEffectGroupState(const mixxx::EngineParameters& engineParameters); - virtual ~GraphicEQEffectGroupState(); + ~GraphicEQEffectGroupState() override; void setFilters(int sampleRate); diff --git a/src/effects/backends/builtin/linkwitzriley8eqeffect.h b/src/effects/backends/builtin/linkwitzriley8eqeffect.h index 3fcfa803db..4fe1e9a39e 100644 --- a/src/effects/backends/builtin/linkwitzriley8eqeffect.h +++ b/src/effects/backends/builtin/linkwitzriley8eqeffect.h @@ -15,7 +15,7 @@ class LinkwitzRiley8EQEffectGroupState : public EffectState { public: LinkwitzRiley8EQEffectGroupState(const mixxx::EngineParameters& engineParameters); - virtual ~LinkwitzRiley8EQEffectGroupState(); + ~LinkwitzRiley8EQEffectGroupState() override; void setFilters(int sampleRate, int lowFreq, int highFreq); diff --git a/src/effects/backends/builtin/loudnesscontoureffect.h b/src/effects/backends/builtin/loudnesscontoureffect.h index 29d32eccb4..f28a74a4c9 100644 --- a/src/effects/backends/builtin/loudnesscontoureffect.h +++ b/src/effects/backends/builtin/loudnesscontoureffect.h @@ -14,7 +14,7 @@ class LoudnessContourEffectGroupState final : public EffectState { public: LoudnessContourEffectGroupState(const mixxx::EngineParameters& engineParameters); - ~LoudnessContourEffectGroupState(); + ~LoudnessContourEffectGroupState() override; void setFilters(int sampleRate, double gain); diff --git a/src/effects/backends/builtin/metronomeeffect.h b/src/effects/backends/builtin/metronomeeffect.h index ed8bef50ca..aa7e48cfd7 100644 --- a/src/effects/backends/builtin/metronomeeffect.h +++ b/src/effects/backends/builtin/metronomeeffect.h @@ -17,8 +17,7 @@ class MetronomeGroupState final : public EffectState { : EffectState(engineParameters), m_framesSinceClickStart(0) { } - ~MetronomeGroupState() { - } + ~MetronomeGroupState() override = default; SINT m_framesSinceClickStart; }; diff --git a/src/effects/backends/builtin/moogladder4filtereffect.h b/src/effects/backends/builtin/moogladder4filtereffect.h index 5957c3a07e..0177e8e2df 100644 --- a/src/effects/backends/builtin/moogladder4filtereffect.h +++ b/src/effects/backends/builtin/moogladder4filtereffect.h @@ -11,7 +11,8 @@ class MoogLadder4FilterGroupState : public EffectState { public: MoogLadder4FilterGroupState(const mixxx::EngineParameters& engineParameters); - ~MoogLadder4FilterGroupState(); + ~MoogLadder4FilterGroupState() override; + void setFilters(int sampleRate, double lowFreq, double highFreq); CSAMPLE* m_pBuf; diff --git a/src/effects/backends/builtin/parametriceqeffect.h b/src/effects/backends/builtin/parametriceqeffect.h index 1ef49881ef..7183d6e0e2 100644 --- a/src/effects/backends/builtin/parametriceqeffect.h +++ b/src/effects/backends/builtin/parametriceqeffect.h @@ -24,6 +24,7 @@ class ParametricEQEffectGroupState final : public EffectState { public: ParametricEQEffectGroupState(const mixxx::EngineParameters& engineParameters); + ~ParametricEQEffectGroupState() override = default; void setFilters(int sampleRate); diff --git a/src/effects/backends/builtin/phasereffect.h b/src/effects/backends/builtin/phasereffect.h index 68282e3989..0f5b667554 100644 --- a/src/effects/backends/builtin/phasereffect.h +++ b/src/effects/backends/builtin/phasereffect.h @@ -16,6 +16,7 @@ class PhaserGroupState final : public EffectState { : EffectState(engineParameters) { clear(); } + ~PhaserGroupState() override = default; void clear() { leftPhase = 0; diff --git a/src/effects/backends/builtin/pitchshifteffect.h b/src/effects/backends/builtin/pitchshifteffect.h index fbc224816c..9708bd4f4d 100644 --- a/src/effects/backends/builtin/pitchshifteffect.h +++ b/src/effects/backends/builtin/pitchshifteffect.h @@ -20,8 +20,8 @@ class RubberBandStretcher; class PitchShiftGroupState : public EffectState { public: PitchShiftGroupState(const mixxx::EngineParameters& engineParameters); - ~PitchShiftGroupState() override; + void initializeBuffer(const mixxx::EngineParameters& engineParameters); void audioParametersChanged(const mixxx::EngineParameters& engineParameters); diff --git a/src/effects/backends/builtin/reverbeffect.h b/src/effects/backends/builtin/reverbeffect.h index 02154566a8..70032eb435 100644 --- a/src/effects/backends/builtin/reverbeffect.h +++ b/src/effects/backends/builtin/reverbeffect.h @@ -22,6 +22,7 @@ class ReverbGroupState : public EffectState { sampleRate(engineParameters.sampleRate()), sendPrevious(0) { } + ~ReverbGroupState() override = default; void engineParametersChanged(const mixxx::EngineParameters& engineParameters) { sampleRate = engineParameters.sampleRate(); diff --git a/src/effects/backends/builtin/threebandbiquadeqeffect.cpp b/src/effects/backends/builtin/threebandbiquadeqeffect.cpp index 0d89b9d151..76f44906a2 100644 --- a/src/effects/backends/builtin/threebandbiquadeqeffect.cpp +++ b/src/effects/backends/builtin/threebandbiquadeqeffect.cpp @@ -96,9 +96,6 @@ ThreeBandBiquadEQEffectGroupState::ThreeBandBiquadEQEffectGroupState( engineParameters.sampleRate(), kStartupHiFreq / 2, kQKillShelve); } -ThreeBandBiquadEQEffectGroupState::~ThreeBandBiquadEQEffectGroupState() { -} - void ThreeBandBiquadEQEffectGroupState::setFilters( int sampleRate, double lowFreqCorner, double highFreqCorner) { double lowCenter = getCenterFrequency(kMinimumFrequency, lowFreqCorner); diff --git a/src/effects/backends/builtin/threebandbiquadeqeffect.h b/src/effects/backends/builtin/threebandbiquadeqeffect.h index ff92355854..282a8382da 100644 --- a/src/effects/backends/builtin/threebandbiquadeqeffect.h +++ b/src/effects/backends/builtin/threebandbiquadeqeffect.h @@ -15,7 +15,7 @@ class ThreeBandBiquadEQEffectGroupState final : public EffectState { public: ThreeBandBiquadEQEffectGroupState(const mixxx::EngineParameters& engineParameters); - ~ThreeBandBiquadEQEffectGroupState(); + ~ThreeBandBiquadEQEffectGroupState() override = default; void setFilters( int sampleRate, double lowFreqCorner, double highFreqCorner); diff --git a/src/effects/backends/builtin/tremoloeffect.h b/src/effects/backends/builtin/tremoloeffect.h index 5d32bb677b..ce532d8a60 100644 --- a/src/effects/backends/builtin/tremoloeffect.h +++ b/src/effects/backends/builtin/tremoloeffect.h @@ -11,6 +11,8 @@ class TremoloState : public EffectState { public: TremoloState(const mixxx::EngineParameters& engineParameters) : EffectState(engineParameters){}; + ~TremoloState() override = default; + double gain; unsigned int currentFrame; bool quantizeEnabled = false; diff --git a/src/effects/backends/builtin/whitenoiseeffect.h b/src/effects/backends/builtin/whitenoiseeffect.h index e9e6fedc0c..fb87f10a60 100644 --- a/src/effects/backends/builtin/whitenoiseeffect.h +++ b/src/effects/backends/builtin/whitenoiseeffect.h @@ -19,8 +19,7 @@ class WhiteNoiseGroupState final : public EffectState { previous_drywet(0.0), gen(rs()) { } - ~WhiteNoiseGroupState() { - } + ~WhiteNoiseGroupState() override = default; CSAMPLE_GAIN previous_drywet; std::random_device rs; diff --git a/src/effects/backends/lv2/lv2effectprocessor.h b/src/effects/backends/lv2/lv2effectprocessor.h index 65ecb8aabc..2bfc66243f 100644 --- a/src/effects/backends/lv2/lv2effectprocessor.h +++ b/src/effects/backends/lv2/lv2effectprocessor.h @@ -15,7 +15,8 @@ class LV2EffectGroupState final : public EffectState { : EffectState(engineParameters), m_pInstance(nullptr) { } - ~LV2EffectGroupState() { + + ~LV2EffectGroupState() override { if (m_pInstance) { lilv_instance_deactivate(m_pInstance); lilv_instance_free(m_pInstance); |