Audacity  2.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 #include "../../Audacity.h"
12 
13 #if defined(USE_VAMP)
14 
15 #include "audacity/ModuleInterface.h"
16 #include "audacity/EffectInterface.h"
17 #include "audacity/PluginInterface.h"
18 
20 //
21 // VampEffectsModule
22 //
24 
25 class VampEffectsModule final : public ModuleInterface
26 {
27 public:
28  VampEffectsModule(ModuleManagerInterface *moduleManager, const wxString *path);
29  virtual ~VampEffectsModule();
30 
31  // IdentInterface implementatino
32 
33  wxString GetPath() override;
34  wxString GetSymbol() override;
35  wxString GetName() override;
36  wxString GetVendor() override;
37  wxString GetVersion() override;
38  wxString GetDescription() override;
39 
40  // ModuleInterface implementation
41 
42  bool Initialize() override;
43  void Terminate() override;
44 
45  bool AutoRegisterPlugins(PluginManagerInterface & pm) override;
46  wxArrayString FindPlugins(PluginManagerInterface & pm) override;
47  bool RegisterPlugin(PluginManagerInterface & pm, const wxString & path) override;
48 
49  bool IsPluginValid(const wxString & path, bool bFast) override;
50 
51  IdentInterface *CreateInstance(const wxString & path) override;
52  void DeleteInstance(IdentInterface *instance) override;
53 
54 private:
55  // VampEffectModule implementation
56 
57  std::unique_ptr<Vamp::Plugin> FindPlugin(const wxString & wpath,
58  int & output,
59  bool & hasParameters);
60 
61 private:
62  ModuleManagerInterface *mModMan;
63  wxString mPath;
64 };
65 
66 #endif