From 4fa96bc6c6e745179a6f2ff9d103a3e81f6b5006 Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Sat, 30 Sep 2017 22:55:04 +0200 Subject: [PATCH] LB302: Move init of VCA members into constructor initializer list Move the initialization of the members belonging to the VCA into lb302Synth's constructor initializer list. This also removes a duplication initialization of vca_mode from the code. --- plugins/lb302/lb302.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/plugins/lb302/lb302.cpp b/plugins/lb302/lb302.cpp index 34059e95a..a5be95ad6 100644 --- a/plugins/lb302/lb302.cpp +++ b/plugins/lb302/lb302.cpp @@ -284,8 +284,12 @@ lb302Synth::lb302Synth( InstrumentTrack * _instrumentTrack ) : slideToggle( false, this, tr( "Slide" ) ), accentToggle( false, this, tr( "Accent" ) ), deadToggle( false, this, tr( "Dead" ) ), - db24Toggle( false, this, tr( "24dB/oct Filter" ) ) - + db24Toggle( false, this, tr( "24dB/oct Filter" ) ), + vca_attack(1.0 - 0.96406088), + vca_decay(0.99897516), + vca_a0(0.5), + vca_a(0.), + vca_mode(3) { connect( Engine::mixer(), SIGNAL( sampleRateChanged( ) ), @@ -327,20 +331,8 @@ lb302Synth::lb302Synth( InstrumentTrack * _instrumentTrack ) : vcf_envpos = ENVINC; - // Start VCA on an attack. - vca_mode = 3; - vca_a = 0; - - //vca_attack = 1.0 - 0.94406088; - vca_attack = 1.0 - 0.96406088; - vca_decay = 0.99897516; - vco_shape = BL_SAWTOOTH; - // Experimenting with a0 between original (0.5) and 1.0 - vca_a0 = 0.5; - vca_mode = 3; - vcfs[0] = new lb302FilterIIR2(&fs); vcfs[1] = new lb302Filter3Pole(&fs); db24Toggled();