Audacity 3.2.0
Public Member Functions | List of all members
EffectSettingsManager Class Referenceabstract

EffectSettingsManager is an EffectDefinitionInterface that adds a factory function for EffectSettings, and const functions for manipulating those settings. This externalizes certain effect state. More...

#include <EffectInterface.h>

Inheritance diagram for EffectSettingsManager:
[legend]
Collaboration diagram for EffectSettingsManager:
[legend]

Public Member Functions

virtual ~EffectSettingsManager ()
 
virtual bool VisitSettings (SettingsVisitor &visitor, EffectSettings &settings)
 
virtual bool VisitSettings (ConstSettingsVisitor &visitor, const EffectSettings &settings) const
 
settings

Interface for saving and loading externalized settings. All methods are const!

virtual EffectSettings MakeSettings () const
 
virtual bool CopySettingsContents (const EffectSettings &src, EffectSettings &dst) const
 Update one settings object from another. More...
 
virtual bool SaveSettings (const EffectSettings &settings, CommandParameters &parms) const =0
 Store settings as keys and values. More...
 
virtual bool LoadSettings (const CommandParameters &parms, EffectSettings &settings) const =0
 Restore settings from keys and values. More...
 
virtual RegistryPaths GetFactoryPresets () const =0
 Report names of factory presets. More...
 
virtual OptionalMessage LoadUserPreset (const RegistryPath &name, EffectSettings &settings) const =0
 
virtual bool SaveUserPreset (const RegistryPath &name, const EffectSettings &settings) const =0
 Save settings in the configuration file as a user-named preset. More...
 
virtual OptionalMessage LoadFactoryPreset (int id, EffectSettings &settings) const =0
 
virtual OptionalMessage LoadFactoryDefaults (EffectSettings &settings) const =0
 
outputs
virtual std::unique_ptr< EffectOutputsMakeOutputs () const
 Produce an object to hold values to send to effect output meters. More...
 
- Public Member Functions inherited from EffectDefinitionInterface
virtual ~EffectDefinitionInterface ()
 
virtual EffectType GetType () const =0
 Type determines how it behaves. More...
 
virtual EffectType GetClassification () const
 Determines which menu it appears in; default same as GetType(). More...
 
virtual EffectFamilySymbol GetFamily () const =0
 Report identifier and user-visible name of the effect protocol. More...
 
virtual bool IsInteractive () const =0
 Whether the effect needs a dialog for entry of settings. More...
 
virtual bool IsDefault () const =0
 Whether the effect sorts "above the line" in the menus. More...
 
virtual RealtimeSince RealtimeSupport () const =0
 Since which version of Audacity has the effect supported realtime? More...
 
bool SupportsRealtime () const
 
virtual bool SupportsAutomation () const =0
 Whether the effect has any automatable controls. More...
 
virtual bool EnablesDebug () const
 Whether the effect dialog should have a Debug button; default, always false. More...
 
virtual ManualPageID ManualPage () const
 Name of a page in the Audacity alpha manual, default is empty. More...
 
virtual FilePath HelpPage () const
 Fully qualified local help file name, default is empty. More...
 
virtual bool IsHiddenFromMenus () const
 Default is false. More...
 
- Public Member Functions inherited from ComponentInterface
virtual ~ComponentInterface ()
 
virtual PluginPath GetPath () const =0
 
virtual ComponentInterfaceSymbol GetSymbol () const =0
 
virtual VendorSymbol GetVendor () const =0
 
virtual wxString GetVersion () const =0
 
virtual TranslatableString GetDescription () const =0
 
TranslatableString GetName () const
 

Additional Inherited Members

- Public Types inherited from EffectDefinitionInterface
enum class  RealtimeSince : unsigned { Never , After_3_1 , Always }
 In which versions of Audacity was an effect realtime capable? More...
 
- Static Public Member Functions inherited from EffectDefinitionInterface
static Identifier GetSquashedName (const Identifier &ident)
 A utility that strips spaces and CamelCases a name. More...
 

Detailed Description

EffectSettingsManager is an EffectDefinitionInterface that adds a factory function for EffectSettings, and const functions for manipulating those settings. This externalizes certain effect state.

Definition at line 314 of file EffectInterface.h.

Constructor & Destructor Documentation

◆ ~EffectSettingsManager()

EffectSettingsManager::~EffectSettingsManager ( )
virtualdefault

Member Function Documentation

◆ CopySettingsContents()

bool EffectSettingsManager::CopySettingsContents ( const EffectSettings src,
EffectSettings dst 
) const
virtual

Update one settings object from another.

This may run in a worker thread, and should avoid memory allocations. Therefore do not copy the underlying std::any, but copy the contents of the contained objects.

Assume that src and dst were created and previously modified only by this

Default implementation does nothing and returns true

Parameters
srcsettings to copy from
dstsettings to copy into
copyDirectiondirection in which copy is performed
Returns
success

Reimplemented in AudioUnitEffectBase, EffectWithSettings< BassTrebleSettings, PerTrackEffect >, EffectWithSettings< EffectDistortionSettings, PerTrackEffect >, EffectWithSettings< DtmfSettings, PerTrackEffect >, EffectWithSettings< EchoSettings, PerTrackEffect >, EffectWithSettings< CompressorSettings, StatelessPerTrackEffect >, EffectWithSettings< LimiterSettings, StatelessPerTrackEffect >, EffectWithSettings< LadspaEffectSettings, PerTrackEffect >, EffectWithSettings< NyquistSettings, StatefulEffect >, EffectWithSettings< EffectPhaserSettings, PerTrackEffect >, EffectWithSettings< ReverbSettings, PerTrackEffect >, EffectWithSettings< EffectWahwahSettings, PerTrackEffect >, LadspaEffectBase, LV2EffectBase, and VST3EffectBase.

Definition at line 126 of file EffectInterface.cpp.

128{
129 return true;
130}

Referenced by RealtimeEffectState::AccessState::FromMainSlot::Reader::Reader().

Here is the caller graph for this function:

◆ GetFactoryPresets()

virtual RegistryPaths EffectSettingsManager::GetFactoryPresets ( ) const
pure virtual

Report names of factory presets.

Implemented in AudioUnitEffectBase, DistortionBase, EqualizationBase, ReverbBase, Effect, LadspaEffectBase, LV2EffectBase, VSTEffectBase, VST3EffectBase, EffectCompressor, and EffectLimiter.

Referenced by EffectUIHost::OnMenu().

Here is the caller graph for this function:

◆ LoadFactoryDefaults()

virtual OptionalMessage EffectSettingsManager::LoadFactoryDefaults ( EffectSettings settings) const
pure virtual

Change settings back to "factory default"

Returns
nullopt for failure

Implemented in AmplifyBase, ChangeSpeedBase, EqualizationBase, and Effect.

◆ LoadFactoryPreset()

virtual OptionalMessage EffectSettingsManager::LoadFactoryPreset ( int  id,
EffectSettings settings 
) const
pure virtual

Change settings to the preset whose name is GetFactoryPresets()[id]

Returns
nullopt for failure

Implemented in AudioUnitEffectBase, DistortionBase, EqualizationBase, ReverbBase, Effect, LadspaEffectBase, LV2EffectBase, VSTEffectBase, VST3EffectBase, EffectCompressor, and EffectLimiter.

◆ LoadSettings()

virtual bool EffectSettingsManager::LoadSettings ( const CommandParameters parms,
EffectSettings settings 
) const
pure virtual

Restore settings from keys and values.

Returns
true on success

Implemented in AudioUnitEffectBase, TruncSilenceBase, Effect, LadspaEffectBase, LV2EffectBase, NyquistBase, VSTEffectBase, VST3EffectBase, and VampEffect.

Referenced by RealtimeEffectState::HandleXMLEndTag().

Here is the caller graph for this function:

◆ LoadUserPreset()

virtual OptionalMessage EffectSettingsManager::LoadUserPreset ( const RegistryPath name,
EffectSettings settings 
) const
pure virtual

Change settings to a user-named preset

Returns
nullopt for failure

Implemented in AudioUnitEffectBase, Effect, LadspaEffectBase, LV2EffectBase, VSTEffectBase, and VST3EffectBase.

◆ MakeOutputs()

auto EffectSettingsManager::MakeOutputs ( ) const
virtual

Produce an object to hold values to send to effect output meters.

Default implementation returns nullptr

Reimplemented in LadspaEffectBase, LV2EffectBase, EffectCompressor, and EffectLimiter.

Definition at line 120 of file EffectInterface.cpp.

122{
123 return nullptr;
124}

Referenced by RealtimeEffectState::GetEffect().

Here is the caller graph for this function:

◆ MakeSettings()

auto EffectSettingsManager::MakeSettings ( ) const
virtual

◆ SaveSettings()

virtual bool EffectSettingsManager::SaveSettings ( const EffectSettings settings,
CommandParameters parms 
) const
pure virtual

Store settings as keys and values.

The override may assume parms is initially empty

Returns
true on success

Implemented in AudioUnitEffectBase, Effect, LadspaEffectBase, LV2EffectBase, NyquistBase, VSTEffectBase, VST3EffectBase, and VampEffect.

Referenced by RealtimeEffectState::WriteXML().

Here is the caller graph for this function:

◆ SaveUserPreset()

virtual bool EffectSettingsManager::SaveUserPreset ( const RegistryPath name,
const EffectSettings settings 
) const
pure virtual

Save settings in the configuration file as a user-named preset.

Implemented in AudioUnitEffectBase, Effect, LadspaEffectBase, LV2EffectBase, VSTEffectBase, and VST3EffectBase.

Referenced by EffectUIHost::OnApply(), and EffectUIHost::OnSaveAs().

Here is the caller graph for this function:

◆ VisitSettings() [1/2]

bool EffectSettingsManager::VisitSettings ( ConstSettingsVisitor visitor,
const EffectSettings settings 
) const
virtual

Visit settings (read-only), if defined. false means no defined settings. Default implementation returns false

Reimplemented in EqualizationBase, Effect, and NyquistBase.

Definition at line 109 of file EffectInterface.cpp.

111{
112 return false;
113}

◆ VisitSettings() [2/2]

bool EffectSettingsManager::VisitSettings ( SettingsVisitor visitor,
EffectSettings settings 
)
virtual

Visit settings (and maybe change them), if defined. false means no defined settings. Default implementation returns false

Reimplemented in EqualizationBase, Effect, and NyquistBase.

Definition at line 103 of file EffectInterface.cpp.

105{
106 return false;
107}

Referenced by EffectAndCommandPluginManager::GetCommandDefinition().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: