Audacity 3.2.0
LoadVamp.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 LoadVamp.h
6
7 Chris Cannam
8
9**********************************************************************/
10
11
12
13#if defined(USE_VAMP)
14
15#include <memory>
16
17#include "PluginProvider.h"
18#include "EffectInterface.h"
19#include "PluginInterface.h"
20
21#include <vamp-hostsdk/PluginLoader.h>
22
24//
25// VampEffectsModule
26//
28
30{
31public:
33 virtual ~VampEffectsModule();
34
35 // ComponentInterface implementation
36
37 PluginPath GetPath() const override;
38 ComponentInterfaceSymbol GetSymbol() const override;
39 VendorSymbol GetVendor() const override;
40 wxString GetVersion() const override;
41 TranslatableString GetDescription() const override;
42
43 // PluginProvider implementation
44
45 bool Initialize() override;
46 void Terminate() override;
48
49 const FileExtensions &GetFileExtensions() override;
50 FilePath InstallPath() override { return {}; }
51
54 unsigned DiscoverPluginsAtPath(
55 const PluginPath & path, TranslatableString &errMsg,
56 const RegistrationCallback &callback)
57 override;
58
59 bool CheckPluginExist(const PluginPath& path) const override;
60
61 std::unique_ptr<ComponentInterface>
62 LoadPlugin(const PluginPath & path) override;
63
64private:
65 // VampEffectModule implementation
66
67 std::unique_ptr<Vamp::Plugin> FindPlugin(const PluginPath & wpath,
68 int & output,
69 bool & hasParameters);
70};
71
72#endif
std::vector< PluginPath > PluginPaths
Definition: Identifier.h:215
wxString PluginPath
type alias for identifying a Plugin supplied by a module, each module defining its own interpretation...
Definition: Identifier.h:214
Generalized interface for discovery of plug-ins for one protocol.
wxString FilePath
Definition: Project.h:21
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
std::function< const PluginID &(PluginProvider *, ComponentInterface *) > RegistrationCallback
Further expand a path reported by FindModulePaths.
Holds a msgid for the translation catalog; may also bind format arguments.
bool Initialize() override
Called immediately after creation. Let provider initialize.
Definition: LoadVamp.cpp:98
VendorSymbol GetVendor() const override
Definition: LoadVamp.cpp:78
virtual ~VampEffectsModule()
Definition: LoadVamp.cpp:60
const FileExtensions & GetFileExtensions() override
File types associated with this protocol.
Definition: LoadVamp.cpp:119
ComponentInterfaceSymbol GetSymbol() const override
Definition: LoadVamp.cpp:73
unsigned DiscoverPluginsAtPath(const PluginPath &path, TranslatableString &errMsg, const RegistrationCallback &callback) override
Definition: LoadVamp.cpp:206
EffectFamilySymbol GetOptionalFamilySymbol() override
A symbol identifying the family of plug-ins provided by this.
Definition: LoadVamp.cpp:110
PluginPaths FindModulePaths(PluginManagerInterface &pm) override
Definition: LoadVamp.cpp:129
PluginPath GetPath() const override
Definition: LoadVamp.cpp:68
std::unique_ptr< Vamp::Plugin > FindPlugin(const PluginPath &wpath, int &output, bool &hasParameters)
Definition: LoadVamp.cpp:251
void Terminate() override
Called just prior to deletion to allow releasing any resources.
Definition: LoadVamp.cpp:104
FilePath InstallPath() override
Where plug-in files should be copied to install them.
Definition: LoadVamp.h:50
bool CheckPluginExist(const PluginPath &path) const override
Performs plugin/module existence check, still plugin may fail to load. Implementation should avoid lo...
Definition: LoadVamp.cpp:240
TranslatableString GetDescription() const override
Definition: LoadVamp.cpp:89
void AutoRegisterPlugins(PluginManagerInterface &pm) override
Called so that a provider of a static set of plug-ins can register them.
Definition: LoadVamp.cpp:125
std::unique_ptr< ComponentInterface > LoadPlugin(const PluginPath &path) override
Load the plug-in at a path reported by DiscoverPluginsAtPath.
Definition: LoadVamp.cpp:229
wxString GetVersion() const override
Definition: LoadVamp.cpp:83
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.