mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-05 14:49:25 +02:00
Each built-in effect class registers itself with BuiltinEffectsModule
This commit is contained in:
parent
4579835911
commit
69dab8b552
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "Amplify.h"
|
#include "Amplify.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
@ -61,6 +62,8 @@ Param( Clipping, bool, wxT("AllowClipping"), false, false, true, 1
|
|||||||
const ComponentInterfaceSymbol EffectAmplify::Symbol
|
const ComponentInterfaceSymbol EffectAmplify::Symbol
|
||||||
{ XO("Amplify") };
|
{ XO("Amplify") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectAmplify > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectAmplify, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectAmplify, wxEvtHandler)
|
||||||
EVT_SLIDER(ID_Amp, EffectAmplify::OnAmpSlider)
|
EVT_SLIDER(ID_Amp, EffectAmplify::OnAmpSlider)
|
||||||
EVT_TEXT(ID_Amp, EffectAmplify::OnAmpText)
|
EVT_TEXT(ID_Amp, EffectAmplify::OnAmpText)
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "AutoDuck.h"
|
#include "AutoDuck.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
@ -77,6 +78,8 @@ struct AutoDuckRegion
|
|||||||
const ComponentInterfaceSymbol EffectAutoDuck::Symbol
|
const ComponentInterfaceSymbol EffectAutoDuck::Symbol
|
||||||
{ XO("Auto Duck") };
|
{ XO("Auto Duck") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectAutoDuck > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectAutoDuck, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectAutoDuck, wxEvtHandler)
|
||||||
EVT_TEXT(wxID_ANY, EffectAutoDuck::OnValueChanged)
|
EVT_TEXT(wxID_ANY, EffectAutoDuck::OnValueChanged)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "BassTreble.h"
|
#include "BassTreble.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include "../Experimental.h"
|
#include "../Experimental.h"
|
||||||
|
|
||||||
@ -61,6 +62,8 @@ enum kShelfType
|
|||||||
const ComponentInterfaceSymbol EffectBassTreble::Symbol
|
const ComponentInterfaceSymbol EffectBassTreble::Symbol
|
||||||
{ XO("Bass and Treble") };
|
{ XO("Bass and Treble") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectBassTreble > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectBassTreble, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectBassTreble, wxEvtHandler)
|
||||||
EVT_SLIDER(ID_Bass, EffectBassTreble::OnBassSlider)
|
EVT_SLIDER(ID_Bass, EffectBassTreble::OnBassSlider)
|
||||||
EVT_SLIDER(ID_Treble, EffectBassTreble::OnTrebleSlider)
|
EVT_SLIDER(ID_Treble, EffectBassTreble::OnTrebleSlider)
|
||||||
|
@ -19,6 +19,7 @@ the pitch without changing the tempo.
|
|||||||
|
|
||||||
#if USE_SOUNDTOUCH
|
#if USE_SOUNDTOUCH
|
||||||
#include "ChangePitch.h"
|
#include "ChangePitch.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#if USE_SBSMS
|
#if USE_SBSMS
|
||||||
#include <wx/valgen.h>
|
#include <wx/valgen.h>
|
||||||
@ -84,6 +85,8 @@ static const double kSliderWarp = 1.30105; // warp power takes max from 10
|
|||||||
const ComponentInterfaceSymbol EffectChangePitch::Symbol
|
const ComponentInterfaceSymbol EffectChangePitch::Symbol
|
||||||
{ XO("Change Pitch") };
|
{ XO("Change Pitch") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectChangePitch > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectChangePitch, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectChangePitch, wxEvtHandler)
|
||||||
EVT_CHOICE(ID_FromPitch, EffectChangePitch::OnChoice_FromPitch)
|
EVT_CHOICE(ID_FromPitch, EffectChangePitch::OnChoice_FromPitch)
|
||||||
EVT_TEXT(ID_FromOctave, EffectChangePitch::OnSpin_FromOctave)
|
EVT_TEXT(ID_FromOctave, EffectChangePitch::OnSpin_FromOctave)
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "ChangeSpeed.h"
|
#include "ChangeSpeed.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
@ -78,6 +79,8 @@ static const double kSliderWarp = 1.30105; // warp power takes max from 100
|
|||||||
const ComponentInterfaceSymbol EffectChangeSpeed::Symbol
|
const ComponentInterfaceSymbol EffectChangeSpeed::Symbol
|
||||||
{ XO("Change Speed") };
|
{ XO("Change Speed") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectChangeSpeed > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectChangeSpeed, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectChangeSpeed, wxEvtHandler)
|
||||||
EVT_TEXT(ID_PercentChange, EffectChangeSpeed::OnText_PercentChange)
|
EVT_TEXT(ID_PercentChange, EffectChangeSpeed::OnText_PercentChange)
|
||||||
EVT_TEXT(ID_Multiplier, EffectChangeSpeed::OnText_Multiplier)
|
EVT_TEXT(ID_Multiplier, EffectChangeSpeed::OnText_Multiplier)
|
||||||
|
@ -36,6 +36,8 @@
|
|||||||
#include "../widgets/valnum.h"
|
#include "../widgets/valnum.h"
|
||||||
#include "TimeWarper.h"
|
#include "TimeWarper.h"
|
||||||
|
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
// Soundtouch defines these as well, which are also in generated configmac.h
|
// Soundtouch defines these as well, which are also in generated configmac.h
|
||||||
// and configunix.h, so get rid of them before including,
|
// and configunix.h, so get rid of them before including,
|
||||||
// to avoid compiler warnings, and be sure to do this
|
// to avoid compiler warnings, and be sure to do this
|
||||||
@ -78,6 +80,8 @@ static const double kSliderWarp = 1.30105; // warp power takes max from 100
|
|||||||
const ComponentInterfaceSymbol EffectChangeTempo::Symbol
|
const ComponentInterfaceSymbol EffectChangeTempo::Symbol
|
||||||
{ XO("Change Tempo") };
|
{ XO("Change Tempo") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectChangeTempo > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectChangeTempo, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectChangeTempo, wxEvtHandler)
|
||||||
EVT_TEXT(ID_PercentChange, EffectChangeTempo::OnText_PercentChange)
|
EVT_TEXT(ID_PercentChange, EffectChangeTempo::OnText_PercentChange)
|
||||||
EVT_SLIDER(ID_PercentChange, EffectChangeTempo::OnSlider_PercentChange)
|
EVT_SLIDER(ID_PercentChange, EffectChangeTempo::OnSlider_PercentChange)
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "ClickRemoval.h"
|
#include "ClickRemoval.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
@ -56,6 +57,8 @@ Param( Width, int, wxT("Width"), 20, 0, 40, 1 );
|
|||||||
const ComponentInterfaceSymbol EffectClickRemoval::Symbol
|
const ComponentInterfaceSymbol EffectClickRemoval::Symbol
|
||||||
{ XO("Click Removal") };
|
{ XO("Click Removal") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectClickRemoval > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectClickRemoval, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectClickRemoval, wxEvtHandler)
|
||||||
EVT_SLIDER(ID_Thresh, EffectClickRemoval::OnThreshSlider)
|
EVT_SLIDER(ID_Thresh, EffectClickRemoval::OnThreshSlider)
|
||||||
EVT_SLIDER(ID_Width, EffectClickRemoval::OnWidthSlider)
|
EVT_SLIDER(ID_Width, EffectClickRemoval::OnWidthSlider)
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "Compressor.h"
|
#include "Compressor.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
@ -74,6 +75,8 @@ Param( UsePeak, bool, wxT("UsePeak"), false, false, true, 1
|
|||||||
const ComponentInterfaceSymbol EffectCompressor::Symbol
|
const ComponentInterfaceSymbol EffectCompressor::Symbol
|
||||||
{ XO("Compressor") };
|
{ XO("Compressor") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectCompressor > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectCompressor, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectCompressor, wxEvtHandler)
|
||||||
EVT_SLIDER(wxID_ANY, EffectCompressor::OnSlider)
|
EVT_SLIDER(wxID_ANY, EffectCompressor::OnSlider)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "Distortion.h"
|
#include "Distortion.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include "../Experimental.h"
|
#include "../Experimental.h"
|
||||||
|
|
||||||
@ -149,6 +150,8 @@ TranslatableString defaultLabel(int index)
|
|||||||
const ComponentInterfaceSymbol EffectDistortion::Symbol
|
const ComponentInterfaceSymbol EffectDistortion::Symbol
|
||||||
{ XO("Distortion") };
|
{ XO("Distortion") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectDistortion > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectDistortion, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectDistortion, wxEvtHandler)
|
||||||
EVT_CHOICE(ID_Type, EffectDistortion::OnTypeChoice)
|
EVT_CHOICE(ID_Type, EffectDistortion::OnTypeChoice)
|
||||||
EVT_CHECKBOX(ID_DCBlock, EffectDistortion::OnDCBlockCheckbox)
|
EVT_CHECKBOX(ID_DCBlock, EffectDistortion::OnDCBlockCheckbox)
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "DtmfGen.h"
|
#include "DtmfGen.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include "../Experimental.h"
|
#include "../Experimental.h"
|
||||||
|
|
||||||
@ -77,6 +78,8 @@ const static wxChar *kSymbols[] =
|
|||||||
const ComponentInterfaceSymbol EffectDtmf::Symbol
|
const ComponentInterfaceSymbol EffectDtmf::Symbol
|
||||||
{ XO("DTMF Tones") };
|
{ XO("DTMF Tones") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectDtmf > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectDtmf, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectDtmf, wxEvtHandler)
|
||||||
EVT_TEXT(ID_Sequence, EffectDtmf::OnSequence)
|
EVT_TEXT(ID_Sequence, EffectDtmf::OnSequence)
|
||||||
EVT_TEXT(ID_DutyCycle, EffectDtmf::OnAmplitude)
|
EVT_TEXT(ID_DutyCycle, EffectDtmf::OnAmplitude)
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "Echo.h"
|
#include "Echo.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
|
||||||
@ -40,6 +41,8 @@ Param( Decay, float, wxT("Decay"), 0.5f, 0.0f, FLT_MAX, 1.0f );
|
|||||||
const ComponentInterfaceSymbol EffectEcho::Symbol
|
const ComponentInterfaceSymbol EffectEcho::Symbol
|
||||||
{ XO("Echo") };
|
{ XO("Echo") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectEcho > reg; }
|
||||||
|
|
||||||
EffectEcho::EffectEcho()
|
EffectEcho::EffectEcho()
|
||||||
{
|
{
|
||||||
delay = DEF_Delay;
|
delay = DEF_Delay;
|
||||||
|
@ -54,6 +54,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "Equalization.h"
|
#include "Equalization.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include "../Experimental.h"
|
#include "../Experimental.h"
|
||||||
|
|
||||||
@ -194,14 +195,20 @@ Param( dBMax, float, wxT(""), 30.0, 0.0, 60.0,
|
|||||||
const ComponentInterfaceSymbol EffectEqualization::Symbol
|
const ComponentInterfaceSymbol EffectEqualization::Symbol
|
||||||
{ XO("Equalization") };
|
{ XO("Equalization") };
|
||||||
|
|
||||||
|
// namespace{ BuiltinEffectsModule::Registration< EffectEqualization > reg; }
|
||||||
|
|
||||||
// "Filter Curve EQ" in the user-facing string, but preserve the old
|
// "Filter Curve EQ" in the user-facing string, but preserve the old
|
||||||
// internal string
|
// internal string
|
||||||
const ComponentInterfaceSymbol EffectEqualizationCurve::Symbol
|
const ComponentInterfaceSymbol EffectEqualizationCurve::Symbol
|
||||||
{ wxT("Filter Curve"), XO("Filter Curve EQ") };
|
{ wxT("Filter Curve"), XO("Filter Curve EQ") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectEqualizationCurve > reg2; }
|
||||||
|
|
||||||
const ComponentInterfaceSymbol EffectEqualizationGraphic::Symbol
|
const ComponentInterfaceSymbol EffectEqualizationGraphic::Symbol
|
||||||
{ wxT("Graphic EQ"), XO("Graphic EQ") };
|
{ wxT("Graphic EQ"), XO("Graphic EQ") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectEqualizationGraphic > reg3; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectEqualization, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectEqualization, wxEvtHandler)
|
||||||
EVT_SIZE( EffectEqualization::OnSize )
|
EVT_SIZE( EffectEqualization::OnSize )
|
||||||
|
|
||||||
|
@ -18,12 +18,18 @@
|
|||||||
|
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
const ComponentInterfaceSymbol EffectFadeIn::Symbol
|
const ComponentInterfaceSymbol EffectFadeIn::Symbol
|
||||||
{ XO("Fade In") };
|
{ XO("Fade In") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectFadeIn > reg; }
|
||||||
|
|
||||||
const ComponentInterfaceSymbol EffectFadeOut::Symbol
|
const ComponentInterfaceSymbol EffectFadeOut::Symbol
|
||||||
{ XO("Fade Out") };
|
{ XO("Fade Out") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectFadeOut > reg2; }
|
||||||
|
|
||||||
EffectFade::EffectFade(bool fadeIn)
|
EffectFade::EffectFade(bool fadeIn)
|
||||||
{
|
{
|
||||||
mFadeIn = fadeIn;
|
mFadeIn = fadeIn;
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "FindClipping.h"
|
#include "FindClipping.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
@ -43,6 +44,8 @@ Param( Stop, int, wxT("Duty Cycle End"), 3, 1, INT_MAX, 1 );
|
|||||||
const ComponentInterfaceSymbol EffectFindClipping::Symbol
|
const ComponentInterfaceSymbol EffectFindClipping::Symbol
|
||||||
{ XO("Find Clipping") };
|
{ XO("Find Clipping") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectFindClipping > reg; }
|
||||||
|
|
||||||
EffectFindClipping::EffectFindClipping()
|
EffectFindClipping::EffectFindClipping()
|
||||||
{
|
{
|
||||||
mStart = DEF_Start;
|
mStart = DEF_Start;
|
||||||
|
@ -19,9 +19,13 @@
|
|||||||
|
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
const ComponentInterfaceSymbol EffectInvert::Symbol
|
const ComponentInterfaceSymbol EffectInvert::Symbol
|
||||||
{ XO("Invert") };
|
{ XO("Invert") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectInvert > reg; }
|
||||||
|
|
||||||
EffectInvert::EffectInvert()
|
EffectInvert::EffectInvert()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,25 @@
|
|||||||
#include "ChangeTempo.h"
|
#include "ChangeTempo.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
struct BuiltinEffectsModule::Entry {
|
||||||
|
wxString name;
|
||||||
|
BuiltinEffectsModule::Factory factory;
|
||||||
|
bool excluded;
|
||||||
|
|
||||||
|
using Entries = std::vector< Entry >;
|
||||||
|
static Entries &Registry()
|
||||||
|
{
|
||||||
|
static Entries result;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void BuiltinEffectsModule::DoRegistration(
|
||||||
|
const ComponentInterfaceSymbol &name, const Factory &factory, bool excluded )
|
||||||
|
{
|
||||||
|
Entry::Registry().emplace_back( Entry{ name.Internal(), factory, excluded } );
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Include the SoundTouch effects, if requested
|
// Include the SoundTouch effects, if requested
|
||||||
//
|
//
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
#include "audacity/ModuleInterface.h"
|
#include "audacity/ModuleInterface.h"
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
#include <memory>
|
||||||
#include "../MemoryX.h"
|
#include "../MemoryX.h"
|
||||||
|
|
||||||
class Effect;
|
class Effect;
|
||||||
@ -26,6 +28,17 @@ public:
|
|||||||
BuiltinEffectsModule(ModuleManagerInterface *moduleManager, const wxString *path);
|
BuiltinEffectsModule(ModuleManagerInterface *moduleManager, const wxString *path);
|
||||||
virtual ~BuiltinEffectsModule();
|
virtual ~BuiltinEffectsModule();
|
||||||
|
|
||||||
|
using Factory = std::function< std::unique_ptr<Effect> () >;
|
||||||
|
|
||||||
|
// Typically you make a static object of this type in the .cpp file that
|
||||||
|
// also implements the Effect subclass.
|
||||||
|
template< typename Subclass >
|
||||||
|
struct Registration final { Registration( bool excluded = false ) {
|
||||||
|
DoRegistration(
|
||||||
|
Subclass::Symbol, []{ return std::make_unique< Subclass >(); },
|
||||||
|
excluded );
|
||||||
|
} };
|
||||||
|
|
||||||
// ComponentInterface implementation
|
// ComponentInterface implementation
|
||||||
|
|
||||||
PluginPath GetPath() override;
|
PluginPath GetPath() override;
|
||||||
@ -61,8 +74,14 @@ private:
|
|||||||
std::unique_ptr<Effect> Instantiate(const PluginPath & path);
|
std::unique_ptr<Effect> Instantiate(const PluginPath & path);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
static void DoRegistration(
|
||||||
|
const ComponentInterfaceSymbol &name, const Factory &factory,
|
||||||
|
bool excluded );
|
||||||
|
|
||||||
ModuleManagerInterface *mModMan;
|
ModuleManagerInterface *mModMan;
|
||||||
PluginPath mPath;
|
PluginPath mPath;
|
||||||
|
|
||||||
PluginPaths mNames;
|
PluginPaths mNames;
|
||||||
|
|
||||||
|
struct Entry;
|
||||||
};
|
};
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
#include "../widgets/valnum.h"
|
#include "../widgets/valnum.h"
|
||||||
#include "../widgets/ProgressDialog.h"
|
#include "../widgets/ProgressDialog.h"
|
||||||
|
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
enum kNormalizeTargets
|
enum kNormalizeTargets
|
||||||
{
|
{
|
||||||
kLoudness,
|
kLoudness,
|
||||||
@ -61,6 +63,8 @@ END_EVENT_TABLE()
|
|||||||
const ComponentInterfaceSymbol EffectLoudness::Symbol
|
const ComponentInterfaceSymbol EffectLoudness::Symbol
|
||||||
{ XO("Loudness Normalization") };
|
{ XO("Loudness Normalization") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectLoudness > reg; }
|
||||||
|
|
||||||
EffectLoudness::EffectLoudness()
|
EffectLoudness::EffectLoudness()
|
||||||
{
|
{
|
||||||
mStereoInd = DEF_StereoInd;
|
mStereoInd = DEF_StereoInd;
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "Noise.h"
|
#include "Noise.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
@ -58,6 +59,8 @@ Param( Amp, double, wxT("Amplitude"), 0.8, 0.0, 1.0, 1 );
|
|||||||
const ComponentInterfaceSymbol EffectNoise::Symbol
|
const ComponentInterfaceSymbol EffectNoise::Symbol
|
||||||
{ XO("Noise") };
|
{ XO("Noise") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectNoise > reg; }
|
||||||
|
|
||||||
EffectNoise::EffectNoise()
|
EffectNoise::EffectNoise()
|
||||||
{
|
{
|
||||||
mType = DEF_Type;
|
mType = DEF_Type;
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
#include "../Experimental.h"
|
#include "../Experimental.h"
|
||||||
|
|
||||||
|
#include "LoadEffects.h"
|
||||||
#include "EffectManager.h"
|
#include "EffectManager.h"
|
||||||
|
|
||||||
#include "../ShuttleGui.h"
|
#include "../ShuttleGui.h"
|
||||||
@ -423,6 +424,8 @@ private:
|
|||||||
const ComponentInterfaceSymbol EffectNoiseReduction::Symbol
|
const ComponentInterfaceSymbol EffectNoiseReduction::Symbol
|
||||||
{ XO("Noise Reduction") };
|
{ XO("Noise Reduction") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectNoiseReduction > reg; }
|
||||||
|
|
||||||
EffectNoiseReduction::EffectNoiseReduction()
|
EffectNoiseReduction::EffectNoiseReduction()
|
||||||
: mSettings(std::make_unique<EffectNoiseReduction::Settings>())
|
: mSettings(std::make_unique<EffectNoiseReduction::Settings>())
|
||||||
{
|
{
|
||||||
|
@ -45,6 +45,8 @@
|
|||||||
|
|
||||||
#if !defined(EXPERIMENTAL_NOISE_REDUCTION)
|
#if !defined(EXPERIMENTAL_NOISE_REDUCTION)
|
||||||
|
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include "../WaveTrack.h"
|
#include "../WaveTrack.h"
|
||||||
#include "../Prefs.h"
|
#include "../Prefs.h"
|
||||||
#include "../FileNames.h"
|
#include "../FileNames.h"
|
||||||
@ -79,6 +81,8 @@
|
|||||||
const ComponentInterfaceSymbol EffectNoiseRemoval::Symbol
|
const ComponentInterfaceSymbol EffectNoiseRemoval::Symbol
|
||||||
{ XO("Noise Removal") };
|
{ XO("Noise Removal") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectNoiseRemoval > reg; }
|
||||||
|
|
||||||
EffectNoiseRemoval::EffectNoiseRemoval()
|
EffectNoiseRemoval::EffectNoiseRemoval()
|
||||||
{
|
{
|
||||||
mWindowSize = 2048;
|
mWindowSize = 2048;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h" // for rint from configwin.h
|
#include "../Audacity.h" // for rint from configwin.h
|
||||||
#include "Normalize.h"
|
#include "Normalize.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include "../Experimental.h"
|
#include "../Experimental.h"
|
||||||
|
|
||||||
@ -46,6 +47,8 @@ Param( StereoInd, bool, wxT("StereoIndependent"), false, false, true,
|
|||||||
const ComponentInterfaceSymbol EffectNormalize::Symbol
|
const ComponentInterfaceSymbol EffectNormalize::Symbol
|
||||||
{ XO("Normalize") };
|
{ XO("Normalize") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectNormalize > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectNormalize, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectNormalize, wxEvtHandler)
|
||||||
EVT_CHECKBOX(wxID_ANY, EffectNormalize::OnUpdateUI)
|
EVT_CHECKBOX(wxID_ANY, EffectNormalize::OnUpdateUI)
|
||||||
EVT_TEXT(wxID_ANY, EffectNormalize::OnUpdateUI)
|
EVT_TEXT(wxID_ANY, EffectNormalize::OnUpdateUI)
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "Paulstretch.h"
|
#include "Paulstretch.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
@ -86,6 +87,8 @@ private:
|
|||||||
const ComponentInterfaceSymbol EffectPaulstretch::Symbol
|
const ComponentInterfaceSymbol EffectPaulstretch::Symbol
|
||||||
{ XO("Paulstretch") };
|
{ XO("Paulstretch") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectPaulstretch > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectPaulstretch, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectPaulstretch, wxEvtHandler)
|
||||||
EVT_TEXT(wxID_ANY, EffectPaulstretch::OnText)
|
EVT_TEXT(wxID_ANY, EffectPaulstretch::OnText)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "Phaser.h"
|
#include "Phaser.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include "../Experimental.h"
|
#include "../Experimental.h"
|
||||||
|
|
||||||
@ -68,6 +69,8 @@ Param( OutGain, double, wxT("Gain"), -6.0, -30.0, 30.0, 1 );
|
|||||||
const ComponentInterfaceSymbol EffectPhaser::Symbol
|
const ComponentInterfaceSymbol EffectPhaser::Symbol
|
||||||
{ XO("Phaser") };
|
{ XO("Phaser") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectPhaser > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectPhaser, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectPhaser, wxEvtHandler)
|
||||||
EVT_SLIDER(ID_Stages, EffectPhaser::OnStagesSlider)
|
EVT_SLIDER(ID_Stages, EffectPhaser::OnStagesSlider)
|
||||||
EVT_SLIDER(ID_DryWet, EffectPhaser::OnDryWetSlider)
|
EVT_SLIDER(ID_DryWet, EffectPhaser::OnDryWetSlider)
|
||||||
|
@ -32,10 +32,13 @@ the audio, rather than actually finding the clicks.
|
|||||||
#include "../WaveTrack.h"
|
#include "../WaveTrack.h"
|
||||||
#include "../widgets/AudacityMessageBox.h"
|
#include "../widgets/AudacityMessageBox.h"
|
||||||
|
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
const ComponentInterfaceSymbol EffectRepair::Symbol
|
const ComponentInterfaceSymbol EffectRepair::Symbol
|
||||||
{ XO("Repair") };
|
{ XO("Repair") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectRepair > reg; }
|
||||||
|
|
||||||
EffectRepair::EffectRepair()
|
EffectRepair::EffectRepair()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,8 @@
|
|||||||
#include "../widgets/NumericTextCtrl.h"
|
#include "../widgets/NumericTextCtrl.h"
|
||||||
#include "../widgets/valnum.h"
|
#include "../widgets/valnum.h"
|
||||||
|
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
// Define keys, defaults, minimums, and maximums for the effect parameters
|
// Define keys, defaults, minimums, and maximums for the effect parameters
|
||||||
//
|
//
|
||||||
// Name Type Key Def Min Max Scale
|
// Name Type Key Def Min Max Scale
|
||||||
@ -44,6 +46,8 @@ Param( Count, int, wxT("Count"), 1, 1, INT_MAX, 1 );
|
|||||||
const ComponentInterfaceSymbol EffectRepeat::Symbol
|
const ComponentInterfaceSymbol EffectRepeat::Symbol
|
||||||
{ XO("Repeat") };
|
{ XO("Repeat") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectRepeat > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectRepeat, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectRepeat, wxEvtHandler)
|
||||||
EVT_TEXT(wxID_ANY, EffectRepeat::OnRepeatTextChange)
|
EVT_TEXT(wxID_ANY, EffectRepeat::OnRepeatTextChange)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "Reverb.h"
|
#include "Reverb.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include <wx/arrstr.h>
|
#include <wx/arrstr.h>
|
||||||
#include <wx/checkbox.h>
|
#include <wx/checkbox.h>
|
||||||
@ -92,6 +93,8 @@ struct Reverb_priv_t
|
|||||||
const ComponentInterfaceSymbol EffectReverb::Symbol
|
const ComponentInterfaceSymbol EffectReverb::Symbol
|
||||||
{ XO("Reverb") };
|
{ XO("Reverb") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectReverb > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectReverb, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectReverb, wxEvtHandler)
|
||||||
|
|
||||||
#define SpinSliderEvent(n) \
|
#define SpinSliderEvent(n) \
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "Reverse.h"
|
#include "Reverse.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
@ -32,6 +33,8 @@
|
|||||||
const ComponentInterfaceSymbol EffectReverse::Symbol
|
const ComponentInterfaceSymbol EffectReverse::Symbol
|
||||||
{ XO("Reverse") };
|
{ XO("Reverse") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectReverse > reg; }
|
||||||
|
|
||||||
EffectReverse::EffectReverse()
|
EffectReverse::EffectReverse()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ a graph for EffectScienFilter.
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "ScienFilter.h"
|
#include "ScienFilter.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
@ -135,6 +136,11 @@ Param( Stopband, float, wxT("StopbandRipple"), 30.0, 0.0, 100.0,
|
|||||||
const ComponentInterfaceSymbol EffectScienFilter::Symbol
|
const ComponentInterfaceSymbol EffectScienFilter::Symbol
|
||||||
{ XO("Classic Filters") };
|
{ XO("Classic Filters") };
|
||||||
|
|
||||||
|
#ifdef EXPERIMENTAL_SCIENCE_FILTERS
|
||||||
|
// true argument means don't automatically enable this effect
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectScienFilter > reg( true ); }
|
||||||
|
#endif
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectScienFilter, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectScienFilter, wxEvtHandler)
|
||||||
EVT_SIZE(EffectScienFilter::OnSize)
|
EVT_SIZE(EffectScienFilter::OnSize)
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "Silence.h"
|
#include "Silence.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
|
||||||
@ -25,6 +26,8 @@
|
|||||||
const ComponentInterfaceSymbol EffectSilence::Symbol
|
const ComponentInterfaceSymbol EffectSilence::Symbol
|
||||||
{ XO("Silence") };
|
{ XO("Silence") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectSilence > reg; }
|
||||||
|
|
||||||
EffectSilence::EffectSilence()
|
EffectSilence::EffectSilence()
|
||||||
{
|
{
|
||||||
SetLinearEffectFlag(true);
|
SetLinearEffectFlag(true);
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "StereoToMono.h"
|
#include "StereoToMono.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
|
||||||
@ -24,6 +25,8 @@
|
|||||||
const ComponentInterfaceSymbol EffectStereoToMono::Symbol
|
const ComponentInterfaceSymbol EffectStereoToMono::Symbol
|
||||||
{ XO("Stereo To Mono") };
|
{ XO("Stereo To Mono") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectStereoToMono > reg; }
|
||||||
|
|
||||||
EffectStereoToMono::EffectStereoToMono()
|
EffectStereoToMono::EffectStereoToMono()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#if USE_SBSMS
|
#if USE_SBSMS
|
||||||
#include "TimeScale.h"
|
#include "TimeScale.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
@ -54,6 +55,8 @@ Param( PitchPercentEnd, double, wxT("PitchPercentChangeEnd"), 0.0, -50.0,
|
|||||||
const ComponentInterfaceSymbol EffectTimeScale::Symbol
|
const ComponentInterfaceSymbol EffectTimeScale::Symbol
|
||||||
{ wxT("Sliding Stretch"), XO("Sliding Stretch") };
|
{ wxT("Sliding Stretch"), XO("Sliding Stretch") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectTimeScale > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectTimeScale, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectTimeScale, wxEvtHandler)
|
||||||
EVT_TEXT(ID_RatePercentChangeStart, EffectTimeScale::OnText_RatePercentChangeStart)
|
EVT_TEXT(ID_RatePercentChangeStart, EffectTimeScale::OnText_RatePercentChangeStart)
|
||||||
EVT_TEXT(ID_RatePercentChangeEnd, EffectTimeScale::OnText_RatePercentChangeEnd)
|
EVT_TEXT(ID_RatePercentChangeEnd, EffectTimeScale::OnText_RatePercentChangeEnd)
|
||||||
|
@ -20,6 +20,7 @@ frequency changes smoothly during the tone.
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "ToneGen.h"
|
#include "ToneGen.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
@ -85,9 +86,13 @@ Param( Interp, int, wxT("Interpolation"), 0, 0, nInterpolatio
|
|||||||
const ComponentInterfaceSymbol EffectChirp::Symbol
|
const ComponentInterfaceSymbol EffectChirp::Symbol
|
||||||
{ XO("Chirp") };
|
{ XO("Chirp") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectChirp > reg; }
|
||||||
|
|
||||||
const ComponentInterfaceSymbol EffectTone::Symbol
|
const ComponentInterfaceSymbol EffectTone::Symbol
|
||||||
{ XO("Tone") };
|
{ XO("Tone") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectTone > reg2; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectToneGen, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectToneGen, wxEvtHandler)
|
||||||
EVT_TEXT(wxID_ANY, EffectToneGen::OnControlUpdate)
|
EVT_TEXT(wxID_ANY, EffectToneGen::OnControlUpdate)
|
||||||
END_EVENT_TABLE();
|
END_EVENT_TABLE();
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "TruncSilence.h"
|
#include "TruncSilence.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <list>
|
#include <list>
|
||||||
@ -122,6 +123,8 @@ const double detectFrac = 0.4;
|
|||||||
const ComponentInterfaceSymbol EffectTruncSilence::Symbol
|
const ComponentInterfaceSymbol EffectTruncSilence::Symbol
|
||||||
{ XO("Truncate Silence") };
|
{ XO("Truncate Silence") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectTruncSilence > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectTruncSilence, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectTruncSilence, wxEvtHandler)
|
||||||
EVT_CHOICE(wxID_ANY, EffectTruncSilence::OnControlChange)
|
EVT_CHOICE(wxID_ANY, EffectTruncSilence::OnControlChange)
|
||||||
EVT_TEXT(wxID_ANY, EffectTruncSilence::OnControlChange)
|
EVT_TEXT(wxID_ANY, EffectTruncSilence::OnControlChange)
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include "../Audacity.h"
|
#include "../Audacity.h"
|
||||||
#include "Wahwah.h"
|
#include "Wahwah.h"
|
||||||
|
#include "LoadEffects.h"
|
||||||
|
|
||||||
#include "../Experimental.h"
|
#include "../Experimental.h"
|
||||||
|
|
||||||
@ -62,6 +63,8 @@ Param( OutGain, double, wxT("Gain"), -6.0, -30.0, 30.0, 1 );
|
|||||||
const ComponentInterfaceSymbol EffectWahwah::Symbol
|
const ComponentInterfaceSymbol EffectWahwah::Symbol
|
||||||
{ XO("Wahwah") };
|
{ XO("Wahwah") };
|
||||||
|
|
||||||
|
namespace{ BuiltinEffectsModule::Registration< EffectWahwah > reg; }
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(EffectWahwah, wxEvtHandler)
|
BEGIN_EVENT_TABLE(EffectWahwah, wxEvtHandler)
|
||||||
EVT_SLIDER(ID_Freq, EffectWahwah::OnFreqSlider)
|
EVT_SLIDER(ID_Freq, EffectWahwah::OnFreqSlider)
|
||||||
EVT_SLIDER(ID_Phase, EffectWahwah::OnPhaseSlider)
|
EVT_SLIDER(ID_Phase, EffectWahwah::OnPhaseSlider)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user