Eliminate one of the ## macro hacks in LoadEffects

This commit is contained in:
Paul Licameli 2019-01-17 17:33:49 -05:00
parent 83be5b3045
commit 4579835911
67 changed files with 225 additions and 115 deletions

View File

@ -58,6 +58,9 @@ Param( Clipping, bool, wxT("AllowClipping"), false, false, true, 1
// EffectAmplify
//
const ComponentInterfaceSymbol EffectAmplify::Symbol
{ XO("Amplify") };
BEGIN_EVENT_TABLE(EffectAmplify, wxEvtHandler)
EVT_SLIDER(ID_Amp, EffectAmplify::OnAmpSlider)
EVT_TEXT(ID_Amp, EffectAmplify::OnAmpText)
@ -84,7 +87,7 @@ EffectAmplify::~EffectAmplify()
ComponentInterfaceSymbol EffectAmplify::GetSymbol()
{
return AMPLIFY_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectAmplify::GetDescription()

View File

@ -17,7 +17,6 @@
#include "Effect.h"
#define AMPLIFY_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Amplify") }
class wxSlider;
class wxCheckBox;
@ -27,6 +26,8 @@ class ShuttleGui;
class EffectAmplify final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectAmplify();
virtual ~EffectAmplify();

View File

@ -74,6 +74,9 @@ struct AutoDuckRegion
* Effect implementation
*/
const ComponentInterfaceSymbol EffectAutoDuck::Symbol
{ XO("Auto Duck") };
BEGIN_EVENT_TABLE(EffectAutoDuck, wxEvtHandler)
EVT_TEXT(wxID_ANY, EffectAutoDuck::OnValueChanged)
END_EVENT_TABLE()
@ -103,7 +106,7 @@ EffectAutoDuck::~EffectAutoDuck()
ComponentInterfaceSymbol EffectAutoDuck::GetSymbol()
{
return AUTODUCK_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectAutoDuck::GetDescription()

View File

@ -20,11 +20,11 @@ class ShuttleGui;
#define AUTO_DUCK_PANEL_NUM_CONTROL_POINTS 5
#define AUTODUCK_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Auto Duck") }
class EffectAutoDuck final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectAutoDuck();
virtual ~EffectAutoDuck();

View File

@ -58,6 +58,9 @@ enum kShelfType
kTreble
};
const ComponentInterfaceSymbol EffectBassTreble::Symbol
{ XO("Bass and Treble") };
BEGIN_EVENT_TABLE(EffectBassTreble, wxEvtHandler)
EVT_SLIDER(ID_Bass, EffectBassTreble::OnBassSlider)
EVT_SLIDER(ID_Treble, EffectBassTreble::OnTrebleSlider)
@ -86,7 +89,7 @@ EffectBassTreble::~EffectBassTreble()
ComponentInterfaceSymbol EffectBassTreble::GetSymbol()
{
return BASSTREBLE_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectBassTreble::GetDescription()

View File

@ -19,8 +19,6 @@ class wxCheckBox;
class wxTextCtrl;
class ShuttleGui;
#define BASSTREBLE_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Bass and Treble") }
class EffectBassTrebleState
{
public:
@ -38,6 +36,8 @@ public:
class EffectBassTreble final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectBassTreble();
virtual ~EffectBassTreble();

View File

@ -81,6 +81,9 @@ static const double kSliderWarp = 1.30105; // warp power takes max from 10
// EffectChangePitch
const ComponentInterfaceSymbol EffectChangePitch::Symbol
{ XO("Change Pitch") };
BEGIN_EVENT_TABLE(EffectChangePitch, wxEvtHandler)
EVT_CHOICE(ID_FromPitch, EffectChangePitch::OnChoice_FromPitch)
EVT_TEXT(ID_FromOctave, EffectChangePitch::OnSpin_FromOctave)
@ -136,7 +139,7 @@ EffectChangePitch::~EffectChangePitch()
ComponentInterfaceSymbol EffectChangePitch::GetSymbol()
{
return CHANGEPITCH_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectChangePitch::GetDescription()

View File

@ -34,11 +34,11 @@ class wxTextCtrl;
class wxSpinCtrl;
class ShuttleGui;
#define CHANGEPITCH_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Change Pitch") }
class EffectChangePitch final : public EffectSoundTouch
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectChangePitch();
virtual ~EffectChangePitch();

View File

@ -75,6 +75,9 @@ static const double kSliderWarp = 1.30105; // warp power takes max from 100
// EffectChangeSpeed
//
const ComponentInterfaceSymbol EffectChangeSpeed::Symbol
{ XO("Change Speed") };
BEGIN_EVENT_TABLE(EffectChangeSpeed, wxEvtHandler)
EVT_TEXT(ID_PercentChange, EffectChangeSpeed::OnText_PercentChange)
EVT_TEXT(ID_Multiplier, EffectChangeSpeed::OnText_Multiplier)
@ -108,7 +111,7 @@ EffectChangeSpeed::~EffectChangeSpeed()
ComponentInterfaceSymbol EffectChangeSpeed::GetSymbol()
{
return CHANGESPEED_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectChangeSpeed::GetDescription()

View File

@ -21,11 +21,11 @@ class wxTextCtrl;
class NumericTextCtrl;
class ShuttleGui;
#define CHANGESPEED_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Change Speed") }
class EffectChangeSpeed final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectChangeSpeed();
virtual ~EffectChangeSpeed();

View File

@ -75,6 +75,9 @@ static const double kSliderWarp = 1.30105; // warp power takes max from 100
// EffectChangeTempo
//
const ComponentInterfaceSymbol EffectChangeTempo::Symbol
{ XO("Change Tempo") };
BEGIN_EVENT_TABLE(EffectChangeTempo, wxEvtHandler)
EVT_TEXT(ID_PercentChange, EffectChangeTempo::OnText_PercentChange)
EVT_SLIDER(ID_PercentChange, EffectChangeTempo::OnSlider_PercentChange)
@ -110,7 +113,7 @@ EffectChangeTempo::~EffectChangeTempo()
ComponentInterfaceSymbol EffectChangeTempo::GetSymbol()
{
return CHANGETEMPO_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectChangeTempo::GetDescription()

View File

@ -28,11 +28,11 @@ class wxCheckBox;
class wxTextCtrl;
class ShuttleGui;
#define CHANGETEMPO_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Change Tempo") }
class EffectChangeTempo final : public EffectSoundTouch
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectChangeTempo();
virtual ~EffectChangeTempo();

View File

@ -53,6 +53,9 @@ enum
Param( Threshold, int, wxT("Threshold"), 200, 0, 900, 1 );
Param( Width, int, wxT("Width"), 20, 0, 40, 1 );
const ComponentInterfaceSymbol EffectClickRemoval::Symbol
{ XO("Click Removal") };
BEGIN_EVENT_TABLE(EffectClickRemoval, wxEvtHandler)
EVT_SLIDER(ID_Thresh, EffectClickRemoval::OnThreshSlider)
EVT_SLIDER(ID_Width, EffectClickRemoval::OnWidthSlider)
@ -79,7 +82,7 @@ EffectClickRemoval::~EffectClickRemoval()
ComponentInterfaceSymbol EffectClickRemoval::GetSymbol()
{
return CLICKREMOVAL_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectClickRemoval::GetDescription()

View File

@ -23,11 +23,11 @@ class wxTextCtrl;
class Envelope;
class ShuttleGui;
#define CLICKREMOVAL_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Click Removal") }
class EffectClickRemoval final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectClickRemoval();
virtual ~EffectClickRemoval();

View File

@ -71,6 +71,9 @@ Param( UsePeak, bool, wxT("UsePeak"), false, false, true, 1
// EffectCompressor
//----------------------------------------------------------------------------
const ComponentInterfaceSymbol EffectCompressor::Symbol
{ XO("Compressor") };
BEGIN_EVENT_TABLE(EffectCompressor, wxEvtHandler)
EVT_SLIDER(wxID_ANY, EffectCompressor::OnSlider)
END_EVENT_TABLE()
@ -101,7 +104,7 @@ EffectCompressor::~EffectCompressor()
ComponentInterfaceSymbol EffectCompressor::GetSymbol()
{
return COMPRESSOR_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectCompressor::GetDescription()

View File

@ -19,11 +19,10 @@ class wxStaticText;
class EffectCompressorPanel;
class ShuttleGui;
#define COMPRESSOR_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Compressor") }
class EffectCompressor final : public EffectTwoPassSimpleMono
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectCompressor();
virtual ~EffectCompressor();

View File

@ -146,6 +146,9 @@ TranslatableString defaultLabel(int index)
// EffectDistortion
//
const ComponentInterfaceSymbol EffectDistortion::Symbol
{ XO("Distortion") };
BEGIN_EVENT_TABLE(EffectDistortion, wxEvtHandler)
EVT_CHOICE(ID_Type, EffectDistortion::OnTypeChoice)
EVT_CHECKBOX(ID_DCBlock, EffectDistortion::OnDCBlockCheckbox)
@ -187,7 +190,7 @@ EffectDistortion::~EffectDistortion()
ComponentInterfaceSymbol EffectDistortion::GetSymbol()
{
return DISTORTION_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectDistortion::GetDescription()

View File

@ -21,7 +21,6 @@ class wxCheckBox;
class wxTextCtrl;
class ShuttleGui;
#define DISTORTION_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Distortion") }
#define STEPS 1024 // number of +ve or -ve steps in lookup tabe
#define TABLESIZE 2049 // size of lookup table (steps * 2 + 1)
@ -46,6 +45,8 @@ public:
class EffectDistortion final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectDistortion();
virtual ~EffectDistortion();

View File

@ -74,6 +74,9 @@ const static wxChar *kSymbols[] =
// EffectDtmf
//
const ComponentInterfaceSymbol EffectDtmf::Symbol
{ XO("DTMF Tones") };
BEGIN_EVENT_TABLE(EffectDtmf, wxEvtHandler)
EVT_TEXT(ID_Sequence, EffectDtmf::OnSequence)
EVT_TEXT(ID_DutyCycle, EffectDtmf::OnAmplitude)
@ -98,7 +101,7 @@ EffectDtmf::~EffectDtmf()
ComponentInterfaceSymbol EffectDtmf::GetSymbol()
{
return DTMFTONES_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectDtmf::GetDescription()

View File

@ -22,11 +22,11 @@ class wxTextCtrl;
class NumericTextCtrl;
class ShuttleGui;
#define DTMFTONES_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("DTMF Tones") }
class EffectDtmf final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectDtmf();
virtual ~EffectDtmf();

View File

@ -37,6 +37,9 @@
Param( Delay, float, wxT("Delay"), 1.0f, 0.001f, FLT_MAX, 1.0f );
Param( Decay, float, wxT("Decay"), 0.5f, 0.0f, FLT_MAX, 1.0f );
const ComponentInterfaceSymbol EffectEcho::Symbol
{ XO("Echo") };
EffectEcho::EffectEcho()
{
delay = DEF_Delay;
@ -53,7 +56,7 @@ EffectEcho::~EffectEcho()
ComponentInterfaceSymbol EffectEcho::GetSymbol()
{
return ECHO_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectEcho::GetDescription()

View File

@ -16,11 +16,11 @@
class ShuttleGui;
#define ECHO_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Echo") }
class EffectEcho final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectEcho();
virtual ~EffectEcho();

View File

@ -191,6 +191,17 @@ Param( dBMax, float, wxT(""), 30.0, 0.0, 60.0,
// EffectEqualization
//----------------------------------------------------------------------------
const ComponentInterfaceSymbol EffectEqualization::Symbol
{ XO("Equalization") };
// "Filter Curve EQ" in the user-facing string, but preserve the old
// internal string
const ComponentInterfaceSymbol EffectEqualizationCurve::Symbol
{ wxT("Filter Curve"), XO("Filter Curve EQ") };
const ComponentInterfaceSymbol EffectEqualizationGraphic::Symbol
{ wxT("Graphic EQ"), XO("Graphic EQ") };
BEGIN_EVENT_TABLE(EffectEqualization, wxEvtHandler)
EVT_SIZE( EffectEqualization::OnSize )
@ -303,10 +314,10 @@ EffectEqualization::~EffectEqualization()
ComponentInterfaceSymbol EffectEqualization::GetSymbol()
{
if( mOptions == kEqOptionGraphic )
return GRAPHIC_EQ_PLUGIN_SYMBOL;
return EffectEqualizationGraphic::Symbol;
if( mOptions == kEqOptionCurve )
return FILTER_CURVE_PLUGIN_SYMBOL;
return EQUALIZATION_PLUGIN_SYMBOL;
return EffectEqualizationCurve::Symbol;
return EffectEqualization::Symbol;
}
TranslatableString EffectEqualization::GetDescription()

View File

@ -22,15 +22,6 @@
#include "Effect.h"
#include "../RealFFTf.h"
#define EQUALIZATION_PLUGIN_SYMBOL \
ComponentInterfaceSymbol{ XO("Equalization") }
#define GRAPHIC_EQ_PLUGIN_SYMBOL \
ComponentInterfaceSymbol{ wxT("Graphic EQ"), XO("Graphic EQ") }
// "Filter Curve EQ" in the user-facing string, but preserve the old
// internal string
#define FILTER_CURVE_PLUGIN_SYMBOL \
ComponentInterfaceSymbol{ wxT("Filter Curve"), XO("Filter Curve EQ") }
// Flags to specialise the UI
const int kEqOptionGraphic =1;
const int kEqOptionCurve =1<<1;
@ -104,7 +95,10 @@ class EffectEqualization : public Effect,
public XMLTagHandler
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectEqualization(int Options = kEqLegacy);
virtual ~EffectEqualization();
// ComponentInterface implementation
@ -293,12 +287,16 @@ private:
class EffectEqualizationCurve final : public EffectEqualization
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectEqualizationCurve() : EffectEqualization( kEqOptionCurve ) {}
};
class EffectEqualizationGraphic final : public EffectEqualization
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectEqualizationGraphic() : EffectEqualization( kEqOptionGraphic ) {}
};

View File

@ -18,6 +18,12 @@
#include <wx/intl.h>
const ComponentInterfaceSymbol EffectFadeIn::Symbol
{ XO("Fade In") };
const ComponentInterfaceSymbol EffectFadeOut::Symbol
{ XO("Fade Out") };
EffectFade::EffectFade(bool fadeIn)
{
mFadeIn = fadeIn;
@ -32,8 +38,8 @@ EffectFade::~EffectFade()
ComponentInterfaceSymbol EffectFade::GetSymbol()
{
return mFadeIn
? FADEIN_PLUGIN_SYMBOL
: FADEOUT_PLUGIN_SYMBOL;
? EffectFadeIn::Symbol
: EffectFadeOut::Symbol;
}
TranslatableString EffectFade::GetDescription()

View File

@ -13,9 +13,6 @@
#include "Effect.h"
#define FADEIN_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Fade In") }
#define FADEOUT_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Fade Out") }
class EffectFade : public Effect
{
public:
@ -49,6 +46,8 @@ private:
class EffectFadeIn final : public EffectFade
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectFadeIn() : EffectFade{ true } {}
};
@ -56,6 +55,8 @@ public:
class EffectFadeOut final : public EffectFade
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectFadeOut() : EffectFade{ false } {}
};

View File

@ -40,6 +40,9 @@
Param( Start, int, wxT("Duty Cycle Start"), 3, 1, INT_MAX, 1 );
Param( Stop, int, wxT("Duty Cycle End"), 3, 1, INT_MAX, 1 );
const ComponentInterfaceSymbol EffectFindClipping::Symbol
{ XO("Find Clipping") };
EffectFindClipping::EffectFindClipping()
{
mStart = DEF_Start;
@ -54,7 +57,7 @@ EffectFindClipping::~EffectFindClipping()
ComponentInterfaceSymbol EffectFindClipping::GetSymbol()
{
return FINDCLIPPING_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectFindClipping::GetDescription()

View File

@ -18,11 +18,11 @@ class LabelTrack;
#include "Effect.h"
#define FINDCLIPPING_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Find Clipping") }
class EffectFindClipping final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectFindClipping();
virtual ~EffectFindClipping();

View File

@ -19,6 +19,9 @@
#include <wx/intl.h>
const ComponentInterfaceSymbol EffectInvert::Symbol
{ XO("Invert") };
EffectInvert::EffectInvert()
{
}
@ -31,7 +34,7 @@ EffectInvert::~EffectInvert()
ComponentInterfaceSymbol EffectInvert::GetSymbol()
{
return INVERT_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectInvert::GetDescription()

View File

@ -15,11 +15,11 @@
#include "Effect.h"
#define INVERT_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Invert") }
class EffectInvert final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectInvert();
virtual ~EffectInvert();

View File

@ -167,7 +167,7 @@ enum
// Redefine EFFECT() to add the effect's name to an array
//
#undef EFFECT
#define EFFECT(n, i, args) results.push_back((n ## _PLUGIN_SYMBOL).Internal());
#define EFFECT(n, i, args) results.push_back((i :: Symbol).Internal());
//
// Create the effect name array

View File

@ -58,6 +58,9 @@ BEGIN_EVENT_TABLE(EffectLoudness, wxEvtHandler)
EVT_TEXT(wxID_ANY, EffectLoudness::OnUpdateUI)
END_EVENT_TABLE()
const ComponentInterfaceSymbol EffectLoudness::Symbol
{ XO("Loudness Normalization") };
EffectLoudness::EffectLoudness()
{
mStereoInd = DEF_StereoInd;
@ -77,7 +80,7 @@ EffectLoudness::~EffectLoudness()
ComponentInterfaceSymbol EffectLoudness::GetSymbol()
{
return LOUDNESS_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectLoudness::GetDescription()

View File

@ -24,11 +24,11 @@
class ShuttleGui;
#define LOUDNESS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Loudness Normalization") }
class EffectLoudness final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectLoudness();
virtual ~EffectLoudness();

View File

@ -55,6 +55,9 @@ Param( Amp, double, wxT("Amplitude"), 0.8, 0.0, 1.0, 1 );
// EffectNoise
//
const ComponentInterfaceSymbol EffectNoise::Symbol
{ XO("Noise") };
EffectNoise::EffectNoise()
{
mType = DEF_Type;
@ -73,7 +76,7 @@ EffectNoise::~EffectNoise()
ComponentInterfaceSymbol EffectNoise::GetSymbol()
{
return NOISE_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectNoise::GetDescription()

View File

@ -18,11 +18,11 @@
class NumericTextCtrl;
class ShuttleGui;
#define NOISE_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Noise") }
class EffectNoise final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectNoise();
virtual ~EffectNoise();

View File

@ -420,6 +420,9 @@ private:
DECLARE_EVENT_TABLE()
};
const ComponentInterfaceSymbol EffectNoiseReduction::Symbol
{ XO("Noise Reduction") };
EffectNoiseReduction::EffectNoiseReduction()
: mSettings(std::make_unique<EffectNoiseReduction::Settings>())
{
@ -434,7 +437,7 @@ EffectNoiseReduction::~EffectNoiseReduction()
ComponentInterfaceSymbol EffectNoiseReduction::GetSymbol()
{
return NOISEREDUCTION_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectNoiseReduction::GetDescription()

View File

@ -15,10 +15,9 @@
#include "Effect.h"
#define NOISEREDUCTION_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Noise Reduction") }
class EffectNoiseReduction final : public Effect {
public:
static const ComponentInterfaceSymbol Symbol;
EffectNoiseReduction();
virtual ~EffectNoiseReduction();

View File

@ -76,6 +76,9 @@
#include "../PlatformCompatibility.h"
const ComponentInterfaceSymbol EffectNoiseRemoval::Symbol
{ XO("Noise Removal") };
EffectNoiseRemoval::EffectNoiseRemoval()
{
mWindowSize = 2048;
@ -111,7 +114,7 @@ EffectNoiseRemoval::~EffectNoiseRemoval()
ComponentInterfaceSymbol EffectNoiseRemoval::GetSymbol()
{
return XO("Noise Removal");
return Symbol;
}
TranslatableString EffectNoiseRemoval::GetDescription()

View File

@ -33,11 +33,11 @@ class wxTextCtrl;
#include "../RealFFTf.h"
#define NOISEREMOVAL_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Noise Removal") }
class EffectNoiseRemoval final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectNoiseRemoval();
virtual ~EffectNoiseRemoval();

View File

@ -43,6 +43,9 @@ Param( RemoveDC, bool, wxT("RemoveDcOffset"), true, false, true,
Param( ApplyGain, bool, wxT("ApplyGain"), true, false, true, 1 );
Param( StereoInd, bool, wxT("StereoIndependent"), false, false, true, 1 );
const ComponentInterfaceSymbol EffectNormalize::Symbol
{ XO("Normalize") };
BEGIN_EVENT_TABLE(EffectNormalize, wxEvtHandler)
EVT_CHECKBOX(wxID_ANY, EffectNormalize::OnUpdateUI)
EVT_TEXT(wxID_ANY, EffectNormalize::OnUpdateUI)
@ -66,7 +69,7 @@ EffectNormalize::~EffectNormalize()
ComponentInterfaceSymbol EffectNormalize::GetSymbol()
{
return NORMALIZE_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectNormalize::GetDescription()

View File

@ -22,11 +22,11 @@ class wxStaticText;
class wxTextCtrl;
class ShuttleGui;
#define NORMALIZE_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Normalize") }
class EffectNormalize final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectNormalize();
virtual ~EffectNormalize();

View File

@ -83,6 +83,9 @@ private:
// EffectPaulstretch
//
const ComponentInterfaceSymbol EffectPaulstretch::Symbol
{ XO("Paulstretch") };
BEGIN_EVENT_TABLE(EffectPaulstretch, wxEvtHandler)
EVT_TEXT(wxID_ANY, EffectPaulstretch::OnText)
END_EVENT_TABLE()
@ -103,7 +106,7 @@ EffectPaulstretch::~EffectPaulstretch()
ComponentInterfaceSymbol EffectPaulstretch::GetSymbol()
{
return PAULSTRETCH_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectPaulstretch::GetDescription()

View File

@ -14,11 +14,11 @@
class ShuttleGui;
#define PAULSTRETCH_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Paulstretch") }
class EffectPaulstretch final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectPaulstretch();
virtual ~EffectPaulstretch();

View File

@ -65,6 +65,9 @@ Param( OutGain, double, wxT("Gain"), -6.0, -30.0, 30.0, 1 );
// EffectPhaser
//
const ComponentInterfaceSymbol EffectPhaser::Symbol
{ XO("Phaser") };
BEGIN_EVENT_TABLE(EffectPhaser, wxEvtHandler)
EVT_SLIDER(ID_Stages, EffectPhaser::OnStagesSlider)
EVT_SLIDER(ID_DryWet, EffectPhaser::OnDryWetSlider)
@ -103,7 +106,7 @@ EffectPhaser::~EffectPhaser()
ComponentInterfaceSymbol EffectPhaser::GetSymbol()
{
return PHASER_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectPhaser::GetDescription()

View File

@ -24,8 +24,6 @@ class ShuttleGui;
#define NUM_STAGES 24
#define PHASER_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Phaser") }
class EffectPhaserState
{
public:
@ -44,6 +42,8 @@ public:
class EffectPhaser final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectPhaser();
virtual ~EffectPhaser();

View File

@ -32,6 +32,10 @@ the audio, rather than actually finding the clicks.
#include "../WaveTrack.h"
#include "../widgets/AudacityMessageBox.h"
const ComponentInterfaceSymbol EffectRepair::Symbol
{ XO("Repair") };
EffectRepair::EffectRepair()
{
}
@ -44,7 +48,7 @@ EffectRepair::~EffectRepair()
ComponentInterfaceSymbol EffectRepair::GetSymbol()
{
return REPAIR_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectRepair::GetDescription()

View File

@ -13,13 +13,13 @@
#include "Effect.h"
#define REPAIR_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Repair") }
class WaveTrack;
class EffectRepair final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectRepair();
virtual ~EffectRepair();

View File

@ -41,6 +41,9 @@
// Name Type Key Def Min Max Scale
Param( Count, int, wxT("Count"), 1, 1, INT_MAX, 1 );
const ComponentInterfaceSymbol EffectRepeat::Symbol
{ XO("Repeat") };
BEGIN_EVENT_TABLE(EffectRepeat, wxEvtHandler)
EVT_TEXT(wxID_ANY, EffectRepeat::OnRepeatTextChange)
END_EVENT_TABLE()
@ -60,7 +63,7 @@ EffectRepeat::~EffectRepeat()
ComponentInterfaceSymbol EffectRepeat::GetSymbol()
{
return REPEAT_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectRepeat::GetDescription()

View File

@ -16,13 +16,13 @@
class wxTextCtrl;
class ShuttleGui;
#define REPEAT_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Repeat") }
class wxStaticText;
class EffectRepeat final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectRepeat();
virtual ~EffectRepeat();

View File

@ -89,6 +89,9 @@ struct Reverb_priv_t
// EffectReverb
//
const ComponentInterfaceSymbol EffectReverb::Symbol
{ XO("Reverb") };
BEGIN_EVENT_TABLE(EffectReverb, wxEvtHandler)
#define SpinSliderEvent(n) \
@ -135,7 +138,7 @@ EffectReverb::~EffectReverb()
ComponentInterfaceSymbol EffectReverb::GetSymbol()
{
return REVERB_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectReverb::GetDescription()

View File

@ -19,13 +19,13 @@ class wxSlider;
class wxSpinCtrl;
class ShuttleGui;
#define REVERB_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Reverb") }
struct Reverb_priv_t;
class EffectReverb final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectReverb();
virtual ~EffectReverb();

View File

@ -29,6 +29,9 @@
// EffectReverse
//
const ComponentInterfaceSymbol EffectReverse::Symbol
{ XO("Reverse") };
EffectReverse::EffectReverse()
{
}
@ -41,7 +44,7 @@ EffectReverse::~EffectReverse()
ComponentInterfaceSymbol EffectReverse::GetSymbol()
{
return REVERSE_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectReverse::GetDescription()

View File

@ -15,11 +15,11 @@
#include "Effect.h"
#define REVERSE_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Reverse") }
class EffectReverse final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectReverse();
virtual ~EffectReverse();

View File

@ -132,6 +132,9 @@ Param( Stopband, float, wxT("StopbandRipple"), 30.0, 0.0, 100.0,
// EffectScienFilter
//----------------------------------------------------------------------------
const ComponentInterfaceSymbol EffectScienFilter::Symbol
{ XO("Classic Filters") };
BEGIN_EVENT_TABLE(EffectScienFilter, wxEvtHandler)
EVT_SIZE(EffectScienFilter::OnSize)
@ -173,7 +176,7 @@ EffectScienFilter::~EffectScienFilter()
ComponentInterfaceSymbol EffectScienFilter::GetSymbol()
{
return CLASSICFILTERS_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectScienFilter::GetDescription()

View File

@ -27,13 +27,13 @@ class wxTextCtrl;
class RulerPanel;
class ShuttleGui;
#define CLASSICFILTERS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Classic Filters") }
class EffectScienFilterPanel;
class EffectScienFilter final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectScienFilter();
virtual ~EffectScienFilter();

View File

@ -22,6 +22,9 @@
#include "../WaveTrack.h"
#include "../widgets/NumericTextCtrl.h"
const ComponentInterfaceSymbol EffectSilence::Symbol
{ XO("Silence") };
EffectSilence::EffectSilence()
{
SetLinearEffectFlag(true);
@ -35,7 +38,7 @@ EffectSilence::~EffectSilence()
ComponentInterfaceSymbol EffectSilence::GetSymbol()
{
return SILENCE_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectSilence::GetDescription()

View File

@ -17,11 +17,11 @@
class NumericTextCtrl;
#define SILENCE_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Silence") }
class EffectSilence final : public Generator
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectSilence();
virtual ~EffectSilence();

View File

@ -21,6 +21,9 @@
#include "../Project.h"
#include "../WaveTrack.h"
const ComponentInterfaceSymbol EffectStereoToMono::Symbol
{ XO("Stereo To Mono") };
EffectStereoToMono::EffectStereoToMono()
{
}
@ -33,7 +36,7 @@ EffectStereoToMono::~EffectStereoToMono()
ComponentInterfaceSymbol EffectStereoToMono::GetSymbol()
{
return STEREOTOMONO_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectStereoToMono::GetDescription()

View File

@ -13,11 +13,11 @@
#include "Effect.h"
#define STEREOTOMONO_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Stereo To Mono") }
class EffectStereoToMono final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectStereoToMono();
virtual ~EffectStereoToMono();

View File

@ -51,6 +51,9 @@ Param( PitchPercentEnd, double, wxT("PitchPercentChangeEnd"), 0.0, -50.0,
// EffectTimeScale
//
const ComponentInterfaceSymbol EffectTimeScale::Symbol
{ wxT("Sliding Stretch"), XO("Sliding Stretch") };
BEGIN_EVENT_TABLE(EffectTimeScale, wxEvtHandler)
EVT_TEXT(ID_RatePercentChangeStart, EffectTimeScale::OnText_RatePercentChangeStart)
EVT_TEXT(ID_RatePercentChangeEnd, EffectTimeScale::OnText_RatePercentChangeEnd)
@ -87,7 +90,7 @@ EffectTimeScale::~EffectTimeScale()
ComponentInterfaceSymbol EffectTimeScale::GetSymbol()
{
return TIMESCALE_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectTimeScale::GetDescription()

View File

@ -21,15 +21,11 @@ class wxSlider;
class wxTextCtrl;
class ShuttleGui;
// two strings here
// unusual case
#define TIMESCALE_PLUGIN_SYMBOL \
ComponentInterfaceSymbol{ wxT("Sliding Stretch"), \
XO("Sliding Stretch") }
class EffectTimeScale final : public EffectSBSMS
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectTimeScale();
virtual ~EffectTimeScale();

View File

@ -82,6 +82,12 @@ Param( Interp, int, wxT("Interpolation"), 0, 0, nInterpolatio
// EffectToneGen
//
const ComponentInterfaceSymbol EffectChirp::Symbol
{ XO("Chirp") };
const ComponentInterfaceSymbol EffectTone::Symbol
{ XO("Tone") };
BEGIN_EVENT_TABLE(EffectToneGen, wxEvtHandler)
EVT_TEXT(wxID_ANY, EffectToneGen::OnControlUpdate)
END_EVENT_TABLE();
@ -117,8 +123,8 @@ EffectToneGen::~EffectToneGen()
ComponentInterfaceSymbol EffectToneGen::GetSymbol()
{
return mChirp
? CHIRP_PLUGIN_SYMBOL
: TONE_PLUGIN_SYMBOL;
? EffectChirp::Symbol
: EffectTone::Symbol;
}
TranslatableString EffectToneGen::GetDescription()

View File

@ -18,9 +18,6 @@
class NumericTextCtrl;
class ShuttleGui;
#define CHIRP_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Chirp") }
#define TONE_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Tone") }
class EffectToneGen : public Effect
{
public:
@ -81,6 +78,8 @@ private:
class EffectChirp final : public EffectToneGen
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectChirp() : EffectToneGen{ true } {}
};
@ -88,6 +87,8 @@ public:
class EffectTone final : public EffectToneGen
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectTone() : EffectToneGen{ false } {}
};

View File

@ -119,6 +119,9 @@ static const double DEF_MinTruncMs = 0.001;
// Typical fraction of total time taken by detection (better to guess low)
const double detectFrac = 0.4;
const ComponentInterfaceSymbol EffectTruncSilence::Symbol
{ XO("Truncate Silence") };
BEGIN_EVENT_TABLE(EffectTruncSilence, wxEvtHandler)
EVT_CHOICE(wxID_ANY, EffectTruncSilence::OnControlChange)
EVT_TEXT(wxID_ANY, EffectTruncSilence::OnControlChange)
@ -154,7 +157,7 @@ EffectTruncSilence::~EffectTruncSilence()
ComponentInterfaceSymbol EffectTruncSilence::GetSymbol()
{
return TRUNCATESILENCE_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectTruncSilence::GetDescription()

View File

@ -24,13 +24,13 @@ class wxChoice;
class wxTextCtrl;
class wxCheckBox;
#define TRUNCATESILENCE_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Truncate Silence") }
class RegionList;
class EffectTruncSilence final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectTruncSilence();
virtual ~EffectTruncSilence();

View File

@ -59,6 +59,9 @@ Param( OutGain, double, wxT("Gain"), -6.0, -30.0, 30.0, 1 );
// EffectWahwah
//
const ComponentInterfaceSymbol EffectWahwah::Symbol
{ XO("Wahwah") };
BEGIN_EVENT_TABLE(EffectWahwah, wxEvtHandler)
EVT_SLIDER(ID_Freq, EffectWahwah::OnFreqSlider)
EVT_SLIDER(ID_Phase, EffectWahwah::OnPhaseSlider)
@ -94,7 +97,7 @@ EffectWahwah::~EffectWahwah()
ComponentInterfaceSymbol EffectWahwah::GetSymbol()
{
return WAHWAH_PLUGIN_SYMBOL;
return Symbol;
}
TranslatableString EffectWahwah::GetDescription()

View File

@ -22,8 +22,6 @@ class wxSlider;
class wxTextCtrl;
class ShuttleGui;
#define WAHWAH_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Wahwah") }
class EffectWahwahState
{
public:
@ -41,6 +39,8 @@ public:
class EffectWahwah final : public Effect
{
public:
static const ComponentInterfaceSymbol Symbol;
EffectWahwah();
virtual ~EffectWahwah();