Audacity 3.2.0
AudioUnitEffectsModule.h
Go to the documentation of this file.
1/*!********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 @file AudioUnitEffectsModule.h
6
7 Dominic Mazzoni
8 Leland Lucius
9
10 Paul Licameli split from AudioUnitEffect.h
11
12**********************************************************************/
13#ifndef AUDACITY_AUDIOUNIT_EFFECTS_MODULE_H
14#define AUDACITY_AUDIOUNIT_EFFECTS_MODULE_H
15
16#if USE_AUDIO_UNITS
17
18#include <AudioToolbox/AudioUnitUtilities.h>
19#include "Callable.h"
20#include "GlobalVariable.h"
21#include "PluginProvider.h"
22#include "AudioUnitEffectBase.h"
23
25//
26// AudioUnitEffectsModule
27//
29
31{
32public:
33 struct Factory : DefaultedGlobalHook<Factory,
34 Callable::UniquePtrFactory<AudioUnitEffectBase,
35 const PluginPath &, const wxString &/*name*/, AudioComponent>::Function
36 >{};
37
40
41 // ComponentInterface implementation
42
43 PluginPath GetPath() const override;
44 ComponentInterfaceSymbol GetSymbol() const override;
45 VendorSymbol GetVendor() const override;
46 wxString GetVersion() const override;
47 TranslatableString GetDescription() const override;
48
49 // PluginProvider implementation
50
51 bool Initialize() override;
52 void Terminate() override;
54
55 const FileExtensions &GetFileExtensions() override;
56 FilePath InstallPath() override { return {}; }
57
60 unsigned DiscoverPluginsAtPath(
61 const PluginPath & path, TranslatableString &errMsg,
62 const RegistrationCallback &callback)
63 override;
64
65
66 bool CheckPluginExist(const PluginPath& path) const override;
67
68 std::unique_ptr<ComponentInterface>
69 LoadPlugin(const PluginPath & path) override;
70
71 // AudioUnitEffectModule implementation
72
73 void LoadAudioUnitsOfType(OSType inAUType, PluginPaths & effects);
74};
75
76#endif
77
78#endif
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
const FileExtensions & GetFileExtensions() override
File types associated with this protocol.
void Terminate() override
Called just prior to deletion to allow releasing any resources.
bool CheckPluginExist(const PluginPath &path) const override
Performs plugin/module existence check, still plugin may fail to load. Implementation should avoid lo...
EffectFamilySymbol GetOptionalFamilySymbol() override
A symbol identifying the family of plug-ins provided by this.
wxString GetVersion() const override
PluginPaths FindModulePaths(PluginManagerInterface &pm) override
void LoadAudioUnitsOfType(OSType inAUType, PluginPaths &effects)
bool Initialize() override
Called immediately after creation. Let provider initialize.
ComponentInterfaceSymbol GetSymbol() const override
void AutoRegisterPlugins(PluginManagerInterface &pm) override
Called so that a provider of a static set of plug-ins can register them.
PluginPath GetPath() const override
VendorSymbol GetVendor() const override
unsigned DiscoverPluginsAtPath(const PluginPath &path, TranslatableString &errMsg, const RegistrationCallback &callback) override
std::unique_ptr< ComponentInterface > LoadPlugin(const PluginPath &path) override
Load the plug-in at a path reported by DiscoverPluginsAtPath.
FilePath InstallPath() override
Where plug-in files should be copied to install them.
TranslatableString GetDescription() const override
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.
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.