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, SettingsCopyDirection copyDirection) 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 bool LoadUserPreset (const RegistryPath &name, EffectSettings &settings) const =0
 Change settings to a user-named preset. More...
 
virtual bool SaveUserPreset (const RegistryPath &name, const EffectSettings &settings) const =0
 Save settings in the configuration file as a user-named preset. More...
 
virtual bool LoadFactoryPreset (int id, EffectSettings &settings) const =0
 Change settings to the preset whose name is GetFactoryPresets()[id] More...
 
virtual bool LoadFactoryDefaults (EffectSettings &settings) const =0
 Change settings back to "factory default". 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 , Since_3_2 , 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 253 of file EffectInterface.h.

Constructor & Destructor Documentation

◆ ~EffectSettingsManager()

EffectSettingsManager::~EffectSettingsManager ( )
virtualdefault

Member Function Documentation

◆ CopySettingsContents()

bool EffectSettingsManager::CopySettingsContents ( const EffectSettings src,
EffectSettings dst,
SettingsCopyDirection  copyDirection 
) 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 LadspaEffect, LV2Effect, VST3Effect, AudioUnitEffect, EffectWithSettings< DtmfSettings, PerTrackEffect >, EffectWithSettings< EffectEchoSettings, PerTrackEffect >, EffectWithSettings< EffectReverbSettings, PerTrackEffect >, EffectWithSettings< EffectWahwahSettings, PerTrackEffect >, EffectWithSettings< LadspaEffectSettings, PerTrackEffect >, and EffectWithSettings< NyquistSettings, StatefulEffect >.

Definition at line 112 of file EffectInterface.cpp.

114{
115 return true;
116}

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 AudioUnitEffect, EffectDistortion, Effect, EffectEqualization, LadspaEffect, LV2Effect, EffectReverb, VSTEffect, and VST3Effect.

Referenced by EffectUIHost::OnMenu().

Here is the caller graph for this function:

◆ LoadFactoryDefaults()

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

Change settings back to "factory default".

Implemented in EffectAmplify, EffectChangeSpeed, Effect, and EffectEqualization.

◆ LoadFactoryPreset()

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

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

Implemented in AudioUnitEffect, EffectDistortion, Effect, EffectEqualization, LadspaEffect, LV2Effect, EffectReverb, VSTEffect, and VST3Effect.

◆ 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 AudioUnitEffect, Effect, LadspaEffect, LV2Effect, NyquistEffect, EffectTruncSilence, VampEffect, VSTEffect, and VST3Effect.

Referenced by RealtimeEffectState::HandleXMLEndTag().

Here is the caller graph for this function:

◆ LoadUserPreset()

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

Change settings to a user-named preset.

Implemented in AudioUnitEffect, Effect, LadspaEffect, LV2Effect, VSTEffect, and VST3Effect.

◆ MakeSettings()

auto EffectSettingsManager::MakeSettings ( ) const
virtual

Produce an object holding new, independent settings

Default implementation returns an empty any

Reimplemented in AudioUnitEffect, EffectWithSettings< DtmfSettings, PerTrackEffect >, EffectWithSettings< EffectEchoSettings, PerTrackEffect >, EffectWithSettings< EffectReverbSettings, PerTrackEffect >, EffectWithSettings< EffectWahwahSettings, PerTrackEffect >, EffectWithSettings< LadspaEffectSettings, PerTrackEffect >, EffectWithSettings< NyquistSettings, StatefulEffect >, LadspaEffect, LV2Effect, VSTEffect, and VST3Effect.

Definition at line 107 of file EffectInterface.cpp.

108{
109 return {};
110}

Referenced by RealtimeEffectState::GetEffect(), VSTEffect::MakeSettings(), Effect::SetBatchProcessing(), and Effect::UnsetBatchProcessing().

Here is the caller graph for this function:

◆ 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 AudioUnitEffect, Effect, LadspaEffect, LV2Effect, NyquistEffect, VampEffect, VSTEffect, and VST3Effect.

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 AudioUnitEffect, Effect, LadspaEffect, LV2Effect, VSTEffect, and VST3Effect.

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 Effect, EffectEqualization, and NyquistEffect.

Definition at line 101 of file EffectInterface.cpp.

103{
104 return false;
105}

◆ 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 Effect, EffectEqualization, and NyquistEffect.

Definition at line 95 of file EffectInterface.cpp.

97{
98 return false;
99}

Referenced by EffectManager::GetCommandDefinition().

Here is the caller graph for this function:

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