2010-01-23 19:44:49 +00:00
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
|
|
|
|
LoadEffects.cpp
|
|
|
|
|
|
|
|
Dominic Mazzoni
|
|
|
|
|
2018-03-06 21:42:58 +00:00
|
|
|
**************************************************************************//**
|
Automation: AudacityCommand
This is a squash of 50 commits.
This merges the capabilities of BatchCommands and Effects using a new
AudacityCommand class. AudacityCommand provides one function to specify the
parameters, and then we leverage that one function in automation, whether by chains,
mod-script-pipe or (future) Nyquist.
- Now have AudacityCommand which is using the same mechanism as Effect
- Has configurable parameters
- Has data-entry GUI (built using shuttle GUI)
- Registers with PluginManager.
- Menu commands now provided in chains, and to python batch.
- Tested with Zoom Toggle.
- ShuttleParams now can set, get, set defaults, validate and specify
the parameters.
- Bugfix: Don't overwrite values with defaults first time out.
- Add DefineParams function for all built-in effects.
- Extend CommandContext to carry output channels for results.
We abuse EffectsManager. It handles both Effects and
AudacityCommands now. In time an Effect should become a special case of
AudacityCommand and we'll split and rename the EffectManager class.
- Don't use 'default' as a parameter name.
- Massive renaming for CommandDefinitionInterface
- EffectIdentInterface becomes EffectDefinitionInterface
- EffectAutomationParameters becomes CommandAutomationParameters
- PluginType is now a bit field.
This way we can search for related types at the same time.
- Most old batch commands made into AudacityCommands.
The ones that weren't are for a reason. They are used by mod-script-pipe
to carry commands and responses across from a non-GUI thread to the GUI
thread.
- Major tidy up of ScreenshotCommand
- Reworking of SelectCommand
- GetPreferenceCommand and SetPreferenceCommand
- GetTrackInfo and SetTrackInfo
- GetInfoCommand
- Help, Open, Save, Import and Export commands.
- Removed obsolete commands ExecMenu, GetProjectInfo and SetProjectInfo
which are now better handled by other commands.
- JSONify "GetInfo: Commands" output, i.e. commas in the right places.
- General work on better Doxygen.
- Lyrics -> LyricsPanel
- Meter -> MeterPanel
- Updated Linux makefile.
- Scripting commands added into Extra menu.
- Distinct names for previously duplicated find-clipping parameters.
- Fixed longstanding error with erroneous status field number which
previously caused an ASSERT in debug.
- Sensible formatting of numbers in Chains, 0.1 not 0.1000000000137
2018-01-14 18:51:41 +00:00
|
|
|
\class BuiltinEffectsModule
|
|
|
|
\brief Internal module to auto register all built in effects.
|
2018-03-06 21:42:58 +00:00
|
|
|
*****************************************************************************/
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
#include "../Audacity.h"
|
|
|
|
#include "../Prefs.h"
|
|
|
|
|
|
|
|
#include "LoadEffects.h"
|
2016-03-31 13:24:26 +00:00
|
|
|
#include "../MemoryX.h"
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
#include "EffectManager.h"
|
|
|
|
|
|
|
|
#include "Amplify.h"
|
|
|
|
#include "AutoDuck.h"
|
2013-01-01 01:59:02 +00:00
|
|
|
#include "BassTreble.h"
|
2010-01-23 19:44:49 +00:00
|
|
|
#include "ChangeSpeed.h"
|
|
|
|
#include "ClickRemoval.h"
|
|
|
|
#include "Compressor.h"
|
2016-06-15 00:05:59 +00:00
|
|
|
#include "Distortion.h"
|
2010-01-23 19:44:49 +00:00
|
|
|
#include "DtmfGen.h"
|
|
|
|
#include "Echo.h"
|
2012-06-10 16:08:43 +00:00
|
|
|
#include "Paulstretch.h"
|
2010-01-23 19:44:49 +00:00
|
|
|
#include "Equalization.h"
|
|
|
|
#include "Fade.h"
|
|
|
|
#include "Invert.h"
|
|
|
|
#include "Noise.h"
|
2014-11-10 21:30:44 +00:00
|
|
|
#ifdef EXPERIMENTAL_NOISE_REDUCTION
|
|
|
|
#include "NoiseReduction.h"
|
|
|
|
#endif
|
2010-01-23 19:44:49 +00:00
|
|
|
#include "NoiseRemoval.h"
|
|
|
|
#include "Normalize.h"
|
|
|
|
#include "Phaser.h"
|
|
|
|
#include "Repair.h"
|
|
|
|
#include "Repeat.h"
|
2013-05-02 23:41:27 +00:00
|
|
|
#include "Reverb.h"
|
2010-01-23 19:44:49 +00:00
|
|
|
#include "Reverse.h"
|
|
|
|
#include "Silence.h"
|
2013-10-02 10:32:41 +00:00
|
|
|
#include "ScienFilter.h"
|
2010-01-23 19:44:49 +00:00
|
|
|
#include "StereoToMono.h"
|
2014-06-03 20:30:19 +00:00
|
|
|
#ifdef USE_SBSMS
|
2010-01-23 19:44:49 +00:00
|
|
|
#include "TimeScale.h"
|
|
|
|
#endif
|
|
|
|
#include "ToneGen.h"
|
|
|
|
#include "TruncSilence.h"
|
|
|
|
#include "Wahwah.h"
|
|
|
|
|
|
|
|
#include "FindClipping.h"
|
|
|
|
|
|
|
|
#ifdef USE_SOUNDTOUCH
|
|
|
|
#include "ChangePitch.h"
|
|
|
|
#include "ChangeTempo.h"
|
|
|
|
#endif
|
|
|
|
|
2015-08-31 19:50:50 +00:00
|
|
|
#include "../Experimental.h"
|
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
//
|
|
|
|
// Include the SoundTouch effects, if requested
|
|
|
|
//
|
|
|
|
#if defined(USE_SOUNDTOUCH)
|
|
|
|
#define SOUNDTOUCH_EFFECTS \
|
2016-03-31 13:24:26 +00:00
|
|
|
EFFECT( CHANGEPITCH, EffectChangePitch, () ) \
|
|
|
|
EFFECT( CHANGETEMPO, EffectChangeTempo, () )
|
2014-12-08 22:12:36 +00:00
|
|
|
#else
|
2015-04-17 03:53:42 +00:00
|
|
|
#define SOUNDTOUCH_EFFECTS
|
2014-12-08 22:12:36 +00:00
|
|
|
#endif
|
2014-06-03 20:30:19 +00:00
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
//
|
|
|
|
// Select the desired Noise Reduction/Removal effect
|
|
|
|
//
|
|
|
|
#if defined(EXPERIMENTAL_NOISE_REDUCTION)
|
|
|
|
#define NOISEREDUCTION_EFFECT \
|
2016-03-31 13:24:26 +00:00
|
|
|
EFFECT( NOISEREDUCTION, EffectNoiseReduction, () )
|
2015-04-17 03:53:42 +00:00
|
|
|
#else
|
|
|
|
#define NOISEREDUCTION_EFFECT \
|
2017-02-25 23:32:05 +00:00
|
|
|
EFFECT( NOISEREMOVAL, EffectNoiseRemoval, () )
|
2010-01-23 19:44:49 +00:00
|
|
|
#endif
|
2014-06-03 20:30:19 +00:00
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
//
|
|
|
|
// Include the Classic Filters effect, if requested
|
|
|
|
//
|
|
|
|
#if defined(EXPERIMENTAL_SCIENCE_FILTERS)
|
|
|
|
#define CLASSICFILTER_EFFECT \
|
2016-03-31 13:24:26 +00:00
|
|
|
EFFECT( CLASSICFILTERS, EffectScienFilter, () )
|
2014-12-08 22:12:36 +00:00
|
|
|
#else
|
2015-04-17 03:53:42 +00:00
|
|
|
#define CLASSICFILTER_EFFECT
|
2013-10-02 15:44:36 +00:00
|
|
|
#endif
|
2015-04-17 03:53:42 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Include the SBSMS effect, if requested
|
|
|
|
//
|
|
|
|
#if defined(USE_SBSMS)
|
|
|
|
#define SBSMS_EFFECTS \
|
2016-03-31 13:24:26 +00:00
|
|
|
EFFECT( TIMESCALE, EffectTimeScale, () )
|
2015-04-17 03:53:42 +00:00
|
|
|
#else
|
|
|
|
#define SBSMS_EFFECTS
|
2010-01-23 19:44:49 +00:00
|
|
|
#endif
|
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
//
|
2015-05-12 15:41:22 +00:00
|
|
|
// Define the list of effects that will be autoregistered and how to instantiate each
|
2015-04-17 03:53:42 +00:00
|
|
|
//
|
|
|
|
#define EFFECT_LIST \
|
2016-03-31 13:24:26 +00:00
|
|
|
EFFECT( CHIRP, EffectToneGen, (true) ) \
|
|
|
|
EFFECT( DTMFTONES, EffectDtmf, () ) \
|
|
|
|
EFFECT( NOISE, EffectNoise, () ) \
|
|
|
|
EFFECT( SILENCE, EffectSilence, () ) \
|
|
|
|
EFFECT( TONE, EffectToneGen, (false) ) \
|
|
|
|
EFFECT( AMPLIFY, EffectAmplify, () ) \
|
|
|
|
EFFECT( BASSTREBLE, EffectBassTreble, () ) \
|
|
|
|
EFFECT( CHANGESPEED, EffectChangeSpeed, () ) \
|
|
|
|
EFFECT( CLICKREMOVAL, EffectClickRemoval, () ) \
|
|
|
|
EFFECT( COMPRESSOR, EffectCompressor, () ) \
|
2016-06-15 00:05:59 +00:00
|
|
|
EFFECT( DISTORTION, EffectDistortion, () ) \
|
2016-03-31 13:24:26 +00:00
|
|
|
EFFECT( ECHO, EffectEcho, () ) \
|
|
|
|
EFFECT( EQUALIZATION, EffectEqualization, () ) \
|
|
|
|
EFFECT( FADEIN, EffectFade, (true) ) \
|
|
|
|
EFFECT( FADEOUT, EffectFade, (false) ) \
|
|
|
|
EFFECT( INVERT, EffectInvert, () ) \
|
|
|
|
EFFECT( NORMALIZE, EffectNormalize, () ) \
|
|
|
|
EFFECT( PHASER, EffectPhaser, () ) \
|
|
|
|
EFFECT( REPAIR, EffectRepair, () ) \
|
|
|
|
EFFECT( REPEAT, EffectRepeat, () ) \
|
|
|
|
EFFECT( REVERB, EffectReverb, () ) \
|
|
|
|
EFFECT( REVERSE, EffectReverse, () ) \
|
|
|
|
EFFECT( STEREOTOMONO, EffectStereoToMono, () ) \
|
|
|
|
EFFECT( TRUNCATESILENCE, EffectTruncSilence, () ) \
|
|
|
|
EFFECT( WAHWAH, EffectWahwah, () ) \
|
|
|
|
EFFECT( FINDCLIPPING, EffectFindClipping, () ) \
|
2015-05-22 15:15:47 +00:00
|
|
|
NOISEREDUCTION_EFFECT \
|
2015-06-06 18:16:25 +00:00
|
|
|
SOUNDTOUCH_EFFECTS \
|
2016-03-31 13:24:26 +00:00
|
|
|
EFFECT( AUTODUCK, EffectAutoDuck, () ) \
|
|
|
|
EFFECT( PAULSTRETCH, EffectPaulstretch, () ) \
|
2015-06-06 18:16:25 +00:00
|
|
|
SBSMS_EFFECTS
|
2015-05-22 15:15:47 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Define the list of effects that do not get autoregistered
|
|
|
|
//
|
|
|
|
#define EXCLUDE_LIST \
|
2015-06-06 18:16:25 +00:00
|
|
|
CLASSICFILTER_EFFECT
|
2015-04-17 03:53:42 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Define the EFFECT() macro to generate enum names
|
|
|
|
//
|
2016-03-31 13:24:26 +00:00
|
|
|
#define EFFECT(n, i, args) ENUM_ ## n,
|
2015-04-17 03:53:42 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Create the enum for the list of effects (will be used in a switch statement)
|
|
|
|
//
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
EFFECT_LIST
|
2015-05-22 15:15:47 +00:00
|
|
|
EXCLUDE_LIST
|
2015-04-17 03:53:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
// Redefine EFFECT() to add the effect's name to an array
|
|
|
|
//
|
|
|
|
#undef EFFECT
|
2018-04-12 20:45:40 +00:00
|
|
|
#define EFFECT(n, i, args) results.push_back((n ## _PLUGIN_SYMBOL).Internal());
|
2015-04-17 03:53:42 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Create the effect name array
|
|
|
|
//
|
2018-04-12 20:45:40 +00:00
|
|
|
static const std::vector<wxString> kEffectNames() {
|
|
|
|
std::vector<wxString> results;
|
|
|
|
EFFECT_LIST;
|
|
|
|
return results;
|
|
|
|
}
|
2015-04-17 03:53:42 +00:00
|
|
|
|
2015-05-22 15:15:47 +00:00
|
|
|
//
|
|
|
|
// Create the effect name array of excluded effects
|
|
|
|
//
|
2018-04-12 20:45:40 +00:00
|
|
|
static const std::vector<wxString> kExcludedNames() {
|
|
|
|
std::vector<wxString> results;
|
|
|
|
EXCLUDE_LIST;
|
|
|
|
return results;
|
|
|
|
}
|
2015-05-12 15:41:22 +00:00
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
//
|
|
|
|
// Redefine EFFECT() to generate a case statement for the lookup switch
|
|
|
|
//
|
|
|
|
#undef EFFECT
|
2016-03-31 13:24:26 +00:00
|
|
|
#define EFFECT(n, i, args) case ENUM_ ## n: return std::make_unique<i> args;
|
2015-04-17 03:53:42 +00:00
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Module registration entry point
|
|
|
|
//
|
|
|
|
// This is the symbol that Audacity looks for when the module is built as a
|
|
|
|
// dynamic library.
|
|
|
|
//
|
|
|
|
// When the module is builtin to Audacity, we use the same function, but it is
|
|
|
|
// declared static so as not to clash with other builtin modules.
|
|
|
|
// ============================================================================
|
|
|
|
DECLARE_MODULE_ENTRY(AudacityModule)
|
|
|
|
{
|
|
|
|
// Create and register the importer
|
2016-03-31 14:33:28 +00:00
|
|
|
// Trust the module manager not to leak this
|
|
|
|
return safenew BuiltinEffectsModule(moduleManager, path);
|
2015-04-17 03:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Register this as a builtin module
|
|
|
|
// ============================================================================
|
|
|
|
DECLARE_BUILTIN_MODULE(BuiltinsEffectBuiltin);
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// BuiltinEffectsModule
|
|
|
|
//
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
BuiltinEffectsModule::BuiltinEffectsModule(ModuleManagerInterface *moduleManager,
|
|
|
|
const wxString *path)
|
|
|
|
{
|
|
|
|
mModMan = moduleManager;
|
|
|
|
if (path)
|
|
|
|
{
|
|
|
|
mPath = *path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
BuiltinEffectsModule::~BuiltinEffectsModule()
|
|
|
|
{
|
2019-02-12 00:10:48 +00:00
|
|
|
mPath.clear();
|
2015-04-17 03:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ============================================================================
|
2018-11-02 15:31:44 +00:00
|
|
|
// ComponentInterface implementation
|
2015-04-17 03:53:42 +00:00
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
wxString BuiltinEffectsModule::GetPath()
|
|
|
|
{
|
|
|
|
return mPath;
|
|
|
|
}
|
|
|
|
|
2018-11-02 15:31:44 +00:00
|
|
|
ComponentInterfaceSymbol BuiltinEffectsModule::GetSymbol()
|
2015-04-17 03:53:42 +00:00
|
|
|
{
|
2015-04-19 03:49:05 +00:00
|
|
|
return XO("Builtin Effects");
|
2015-04-17 03:53:42 +00:00
|
|
|
}
|
|
|
|
|
2018-11-02 15:31:44 +00:00
|
|
|
ComponentInterfaceSymbol BuiltinEffectsModule::GetVendor()
|
2015-04-17 03:53:42 +00:00
|
|
|
{
|
2015-04-19 03:49:05 +00:00
|
|
|
return XO("The Audacity Team");
|
2015-04-17 03:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
wxString BuiltinEffectsModule::GetVersion()
|
|
|
|
{
|
|
|
|
// This "may" be different if this were to be maintained as a separate DLL
|
|
|
|
return AUDACITY_VERSION_STRING;
|
|
|
|
}
|
|
|
|
|
|
|
|
wxString BuiltinEffectsModule::GetDescription()
|
|
|
|
{
|
2018-01-08 00:45:20 +00:00
|
|
|
return _("Provides builtin effects to Audacity");
|
2015-04-17 03:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// ModuleInterface implementation
|
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
bool BuiltinEffectsModule::Initialize()
|
|
|
|
{
|
2018-04-12 20:45:40 +00:00
|
|
|
const auto &names = kEffectNames();
|
|
|
|
for (const auto &name : names)
|
2015-04-17 03:53:42 +00:00
|
|
|
{
|
2019-02-12 00:10:48 +00:00
|
|
|
mNames.push_back(wxString(BUILTIN_EFFECT_PREFIX) + name);
|
2015-04-17 03:53:42 +00:00
|
|
|
}
|
2015-05-22 15:15:47 +00:00
|
|
|
|
2018-04-12 20:45:40 +00:00
|
|
|
const auto &excluded = kExcludedNames();
|
|
|
|
for (const auto &name : excluded)
|
2015-05-22 15:15:47 +00:00
|
|
|
{
|
2019-02-12 00:10:48 +00:00
|
|
|
mNames.push_back(wxString(BUILTIN_EFFECT_PREFIX) + name);
|
2015-05-22 15:15:47 +00:00
|
|
|
}
|
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void BuiltinEffectsModule::Terminate()
|
|
|
|
{
|
|
|
|
// Nothing to do here
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2015-05-12 15:41:22 +00:00
|
|
|
bool BuiltinEffectsModule::AutoRegisterPlugins(PluginManagerInterface & pm)
|
2015-04-17 03:53:42 +00:00
|
|
|
{
|
2017-12-27 15:40:38 +00:00
|
|
|
wxString ignoredErrMsg;
|
2018-04-12 20:45:40 +00:00
|
|
|
const auto &names = kEffectNames();
|
|
|
|
for (const auto &name : names)
|
2015-05-12 15:41:22 +00:00
|
|
|
{
|
2018-04-12 20:45:40 +00:00
|
|
|
wxString path(wxString(BUILTIN_EFFECT_PREFIX) + name);
|
2015-05-12 15:41:22 +00:00
|
|
|
|
2015-06-09 05:36:57 +00:00
|
|
|
if (!pm.IsPluginRegistered(path))
|
2015-05-12 15:41:22 +00:00
|
|
|
{
|
2017-12-27 15:40:38 +00:00
|
|
|
// No checking of error ?
|
2017-12-28 23:29:03 +00:00
|
|
|
DiscoverPluginsAtPath(path, ignoredErrMsg,
|
|
|
|
PluginManagerInterface::DefaultRegistrationCallback);
|
2015-05-12 15:41:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// We still want to be called during the normal registration process
|
2015-04-17 03:53:42 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-12-28 23:29:03 +00:00
|
|
|
wxArrayString BuiltinEffectsModule::FindPluginPaths(PluginManagerInterface & WXUNUSED(pm))
|
2015-04-17 03:53:42 +00:00
|
|
|
{
|
|
|
|
return mNames;
|
|
|
|
}
|
|
|
|
|
2017-12-28 23:29:03 +00:00
|
|
|
unsigned BuiltinEffectsModule::DiscoverPluginsAtPath(
|
|
|
|
const wxString & path, wxString &errMsg,
|
|
|
|
const RegistrationCallback &callback)
|
2015-04-17 03:53:42 +00:00
|
|
|
{
|
2017-12-27 15:40:38 +00:00
|
|
|
errMsg.clear();
|
2016-03-31 13:24:26 +00:00
|
|
|
auto effect = Instantiate(path);
|
2015-04-17 03:53:42 +00:00
|
|
|
if (effect)
|
|
|
|
{
|
2018-01-01 01:03:52 +00:00
|
|
|
if (callback)
|
|
|
|
callback(this, effect.get());
|
2017-12-28 23:29:03 +00:00
|
|
|
return 1;
|
2015-04-17 03:53:42 +00:00
|
|
|
}
|
|
|
|
|
2017-12-27 20:09:24 +00:00
|
|
|
errMsg = _("Unknown built-in effect name");
|
2017-12-28 23:29:03 +00:00
|
|
|
return 0;
|
2015-04-17 03:53:42 +00:00
|
|
|
}
|
|
|
|
|
2017-02-05 20:27:56 +00:00
|
|
|
bool BuiltinEffectsModule::IsPluginValid(const wxString & path, bool bFast)
|
2015-04-17 03:53:42 +00:00
|
|
|
{
|
2017-02-05 20:27:56 +00:00
|
|
|
// bFast is unused as checking in the list is fast.
|
2018-02-15 12:11:45 +00:00
|
|
|
static_cast<void>(bFast);
|
2019-03-04 07:13:40 +00:00
|
|
|
return make_iterator_range( mNames ).contains( path );
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
|
2018-11-02 15:31:44 +00:00
|
|
|
ComponentInterface *BuiltinEffectsModule::CreateInstance(const wxString & path)
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2016-03-31 13:42:16 +00:00
|
|
|
// Acquires a resource for the application.
|
|
|
|
// Safety of this depends on complementary calls to DeleteInstance on the module manager side.
|
2016-03-31 13:24:26 +00:00
|
|
|
return Instantiate(path).release();
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
|
2018-11-02 15:31:44 +00:00
|
|
|
void BuiltinEffectsModule::DeleteInstance(ComponentInterface *instance)
|
2015-04-17 03:53:42 +00:00
|
|
|
{
|
2016-03-31 13:42:16 +00:00
|
|
|
// Releases the resource.
|
|
|
|
std::unique_ptr < Effect > {
|
|
|
|
dynamic_cast<Effect *>(instance)
|
|
|
|
};
|
2015-04-17 03:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// BuiltinEffectsModule implementation
|
|
|
|
// ============================================================================
|
|
|
|
|
2016-03-31 13:24:26 +00:00
|
|
|
std::unique_ptr<Effect> BuiltinEffectsModule::Instantiate(const wxString & path)
|
2015-04-17 03:53:42 +00:00
|
|
|
{
|
|
|
|
wxASSERT(path.StartsWith(BUILTIN_EFFECT_PREFIX));
|
2019-03-04 07:13:40 +00:00
|
|
|
auto index = make_iterator_range( mNames ).index( path );
|
|
|
|
wxASSERT( index != wxNOT_FOUND );
|
2015-04-17 03:53:42 +00:00
|
|
|
|
2019-03-04 07:13:40 +00:00
|
|
|
switch ( index )
|
2015-04-17 03:53:42 +00:00
|
|
|
{
|
|
|
|
EFFECT_LIST;
|
2015-05-22 15:15:47 +00:00
|
|
|
EXCLUDE_LIST;
|
2015-04-17 03:53:42 +00:00
|
|
|
}
|
|
|
|
|
2016-04-10 18:15:51 +00:00
|
|
|
return nullptr;
|
2015-04-17 03:53:42 +00:00
|
|
|
}
|