Audacity 3.2.0
Go to the documentation of this file.
3 Audacity: A Digital Audio Editor
5 @file VST3EffectsModule.h
7 @author Vitaly Sverchinsky
9 @brief Part of Audacity VST3 module
13#pragma once
15#include <unordered_map>
16#include <memory>
18#include "Callable.h"
19#include "GlobalVariable.h"
20#include "PluginProvider.h"
21#include "VST3EffectBase.h"
23namespace VST3
25 namespace Hosting
26 {
27 class Module;
28 }
36 //Holds weak pointers to the unique modules which were accessed
37 //through VST3EffectsModule::GetModule() during the lifetime.
38 std::unordered_map<wxString, std::weak_ptr<VST3::Hosting::Module>> mModules;
40 //Attempts to look up for a module, or load it from the hard drive if
41 //none was found (or not valid pointers)
42 std::shared_ptr<VST3::Hosting::Module> GetModule(const wxString& path);
45 struct VST3_API Factory : DefaultedGlobalHook<Factory,
46 Callable::UniquePtrFactory<VST3EffectBase,
47 std::shared_ptr<VST3::Hosting::Module>, VST3::Hosting::ClassInfo
48 >::Function
49 >{};
51 PluginPath GetPath() const override;
52 ComponentInterfaceSymbol GetSymbol() const override;
53 VendorSymbol GetVendor() const override;
54 wxString GetVersion() const override;
55 TranslatableString GetDescription() const override;
57 bool Initialize() override;
58 void Terminate() override;
60 const FileExtensions& GetFileExtensions() override;
61 FilePath InstallPath() override;
62 void AutoRegisterPlugins(PluginManagerInterface& pluginManager) override;
63 PluginPaths FindModulePaths(PluginManagerInterface& pluginManager) override;
64 unsigned DiscoverPluginsAtPath(const PluginPath& path, TranslatableString& errMsg,
65 const RegistrationCallback& callback) override;
66 bool CheckPluginExist(const PluginPath& path) const override;
67 std::unique_ptr<ComponentInterface>
68 LoadPlugin(const PluginPath& path) override;
69 std::unique_ptr<Validator> MakeValidator() const override;
Functions and classes that generate callable objects.
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.
VST3Effect factory.
void AutoRegisterPlugins(PluginManagerInterface &pluginManager) override
Called so that a provider of a static set of plug-ins can register them.
const FileExtensions & GetFileExtensions() override
File types associated with this protocol.
PluginPaths FindModulePaths(PluginManagerInterface &pluginManager) override
std::unique_ptr< ComponentInterface > LoadPlugin(const PluginPath &path) override
Load the plug-in at a path reported by DiscoverPluginsAtPath.
void Terminate() override
Called just prior to deletion to allow releasing any resources.
std::unique_ptr< Validator > MakeValidator() const override
TranslatableString GetDescription() const override
bool CheckPluginExist(const PluginPath &path) const override
Performs plugin/module existence check, still plugin may fail to load. Implementation should avoid lo...
FilePath InstallPath() override
Where plug-in files should be copied to install them.
EffectFamilySymbol GetOptionalFamilySymbol() override
A symbol identifying the family of plug-ins provided by this.
bool Initialize() override
Called immediately after creation. Let provider initialize.
VendorSymbol GetVendor() const override
std::unordered_map< wxString, std::weak_ptr< VST3::Hosting::Module > > mModules
wxString GetVersion() const override
PluginPath GetPath() const override
ComponentInterfaceSymbol GetSymbol() const override
std::shared_ptr< VST3::Hosting::Module > GetModule(const wxString &path)
unsigned DiscoverPluginsAtPath(const PluginPath &path, TranslatableString &errMsg, const RegistrationCallback &callback) override
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.