1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-08 14:13:57 +01:00

Let's try Effect management once more

As usual, I started out intending to do as little as possible
to this to get it working and wound up going overboard.

However, I believe it does allow easy management of the effects
and this will provide a basis for the full blown plugin manager
dialog.
This commit is contained in:
Leland Lucius
2015-05-22 10:15:47 -05:00
parent 6cb9b7d8fb
commit f9061e3916
15 changed files with 543 additions and 493 deletions

View File

@@ -44,7 +44,6 @@ public:
// EffectIdentInterface implementation
virtual EffectType GetType();
//virtual bool EnableFromGetGo(){ return false;};
// EffectClientInterface implementation

View File

@@ -79,7 +79,6 @@ class AUDACITY_DLL_API Effect : public wxEvtHandler,
virtual bool IsLegacy();
virtual bool SupportsRealtime();
virtual bool SupportsAutomation();
virtual bool EnableFromGetGo(){ return true;};
// EffectClientInterface implementation

View File

@@ -34,7 +34,6 @@ public:
// EffectIdentInterface implementation
virtual EffectType GetType();
//virtual bool EnableFromGetGo(){ return false;};
// EffectClientInterface implementation

View File

@@ -128,14 +128,18 @@
EFFECT( TRUNCATESILENCE, EffectTruncSilence() ) \
EFFECT( WAHWAH, EffectWahwah() ) \
EFFECT( FINDCLIPPING, EffectFindClipping() ) \
NOISEREDUCTION_EFFECT \
SOUNDTOUCH_EFFECTS
//
// Define the list of effects that do not get autoregistered
//
#define EXCLUDE_LIST \
EFFECT( AUTODUCK, EffectAutoDuck() ) \
EFFECT( LEVELLER, EffectLeveller() ) \
EFFECT( PAULSTRETCH, EffectPaulstretch() ) \
CLASSICFILTER_EFFECT \
SBSMS_EFFECTS \
NOISEREDUCTION_EFFECT \
SOUNDTOUCH_EFFECTS
SBSMS_EFFECTS
//
// Define the EFFECT() macro to generate enum names
@@ -148,6 +152,7 @@
enum
{
EFFECT_LIST
EXCLUDE_LIST
};
//
@@ -164,6 +169,13 @@ static const wxChar *kEffectNames[] =
EFFECT_LIST
};
//
// Create the effect name array of excluded effects
//
static const wxChar *kExcludedNames[] =
{
EXCLUDE_LIST
};
//
// Redefine EFFECT() to generate a case statement for the lookup switch
@@ -257,6 +269,12 @@ bool BuiltinEffectsModule::Initialize()
{
mNames.Add(wxString(BUILTIN_EFFECT_PREFIX) + kEffectNames[i]);
}
for (size_t i = 0; i < WXSIZEOF(kExcludedNames); i++)
{
mNames.Add(wxString(BUILTIN_EFFECT_PREFIX) + kExcludedNames[i]);
}
return true;
}
@@ -331,6 +349,7 @@ Effect *BuiltinEffectsModule::Instantiate(const wxString & path)
switch (mNames.Index(path))
{
EFFECT_LIST;
EXCLUDE_LIST;
}
return NULL;

View File

@@ -33,7 +33,6 @@ public:
// EffectIdentInterface implementation
virtual EffectType GetType();
//virtual bool EnableFromGetGo(){ return false;};
// EffectClientInterface implementation

View File

@@ -28,8 +28,6 @@ public:
void setParameters(double rateStart, double rateEnd, double pitchStart, double pitchEnd,
SlideType rateSlideType, SlideType pitchSlideType,
bool bLinkRatePitch, bool bRateReferenceInput, bool bPitchReferenceInput);
//virtual bool EnableFromGetGo(){ return false;};
private:
bool ProcessLabelTrack(Track *track);

View File

@@ -47,7 +47,6 @@ public:
// EffectIdentInterface implementation
virtual EffectType GetType();
//virtual bool EnableFromGetGo(){ return false;};
// EffectClientInterface implementation

View File

@@ -117,7 +117,6 @@ public:
virtual bool IsLegacy();
virtual bool SupportsRealtime();
virtual bool SupportsAutomation();
virtual bool EnableFromGetGo(){ return false;};
// EffectClientInterface implementation

View File

@@ -84,7 +84,6 @@ public:
virtual wxString GetFamily();
virtual bool IsInteractive();
virtual bool IsDefault();
virtual bool EnableFromGetGo(){ return true;};
// EffectClientInterface implementation

View File

@@ -56,8 +56,6 @@ public:
virtual wxString GetFamily();
virtual bool IsInteractive();
virtual bool IsDefault();
// May 21015: There aren't many analyse effects, so let us show them all (for now).
virtual bool EnableFromGetGo(){ return true;};
// EffectClientInterface implementation