16#pragma GCC diagnostic ignored "-Wparentheses"
17#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
18#elif defined(__clang__)
19#pragma clang diagnostic ignored "-Wparentheses"
20#pragma clang diagnostic ignored "-Wdeprecated-declarations"
129 if (!instanceFeatures.mOk)
138 LILV_FOREACH(nodes, i, extdata.get()) {
139 const auto node = lilv_nodes_get(extdata.get(), i);
140 const auto uri = lilv_node_as_string(node);
141 if (strcmp(uri, LV2_OPTIONS__interface) == 0)
143 else if (strcmp(uri, LV2_STATE__interface) == 0)
153 auto result = EffectSettings::Make<LV2EffectSettings>();
158 auto &value =
settings.values.emplace_back();
159 value = controlPort->mDef;
171 const auto portsCount = controlPorts.size();
178 assert(srcControls.size() == portsCount);
179 assert(dstControls.size() == portsCount);
181 const auto portValuesCount =
182 std::min(srcControls.size(), dstControls.size());
184 if (portValuesCount != portsCount)
189 for (
auto& port : controlPorts)
192 dstControls[portIndex] = srcControls[portIndex];
204 auto result = std::make_unique<LV2EffectOutputs>();
205 auto &
values = result->values;
226 if (!parms.Write(port->mName,
values[index]))
238 if (port->mIsInput) {
240 if (!parms.Read(port->mName, &d))
243 if (d < port->mMin || d > port->mMax)
252 if (port->mIsInput) {
254 if (!parms.Read(port->mName, &d))
283 LILV_FOREACH(nodes, i, presets.get()) {
284 const auto preset = lilv_nodes_get(presets.get(), i);
291 node_Label,
nullptr) }) {
292 const auto label = lilv_nodes_get_first(labels.get());
319 lilv_state_new_from_world(
gWorld,
328 mySettings.mpState = move(state);
std::optional< std::unique_ptr< EffectSettingsAccess::Message > > OptionalMessage
wxString PluginPath
type alias for identifying a Plugin supplied by a module, each module defining its own interpretation...
std::vector< RegistryPath > RegistryPaths
#define LV2EFFECTS_FAMILY
Lilv_ptr< LilvNodes, lilv_nodes_free > LilvNodesPtr
wxString LilvString(const LilvNode *node)
std::unique_ptr< Type, Lilv_deleter< Type, f > > Lilv_ptr
Generate classes of smart pointers to lv2 resources.
wxString LilvStringMove(LilvNode *node)
Lilv_ptr< LilvNode, lilv_node_free > LilvNodePtr
static Settings & settings()
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the SettingsVis...
bool GetParameters(wxString &parms)
bool SetParameters(const wxString &parms)
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
RealtimeSince
In which versions of Audacity was an effect realtime capable?
Hold values to send to effect output meters.
static result_type Call(Arguments &&...arguments)
Null check of the installed function is done for you.
wxString GetVersion() const override
EffectFamilySymbol GetFamily() const override
Report identifier and user-visible name of the effect protocol.
bool mFactoryPresetsLoaded
bool SaveParameters(const RegistryPath &group, const EffectSettings &settings) const
bool IsInteractive() const override
Whether the effect needs a dialog for entry of settings.
std::unique_ptr< EffectOutputs > MakeOutputs() const override
Produce an object to hold values to send to effect output meters.
EffectSettings MakeSettings() const override
VendorSymbol GetVendor() const override
bool IsDefault() const override
Whether the effect sorts "above the line" in the menus.
TranslatableString GetDescription() const override
bool SaveUserPreset(const RegistryPath &name, const EffectSettings &settings) const override
Save settings in the configuration file as a user-named preset.
PluginPath GetPath() const override
bool CanExportPresets() const override
Whether the effect supports export of presets to files, and importing too.
OptionalMessage LoadParameters(const RegistryPath &group, EffectSettings &settings) const
bool SupportsAutomation() const override
Whether the effect has any automatable controls.
RealtimeSince RealtimeSupport() const override
Since which version of Audacity has the effect supported realtime?
bool CopySettingsContents(const EffectSettings &src, EffectSettings &dst) const override
Update one settings object from another.
std::shared_ptr< EffectInstance > MakeInstance() const override
Make an object maintaining short-term state of an Effect.
RegistryPaths mFactoryPresetNames
bool LoadSettings(const CommandParameters &parms, EffectSettings &settings) const override
Restore settings from keys and values.
bool mWantsStateInterface
bool HasOptions() const override
RegistryPaths GetFactoryPresets() const override
Report names of factory presets.
~LV2EffectBase() override
bool SaveSettings(const EffectSettings &settings, CommandParameters &parms) const override
Store settings as keys and values.
LV2EffectBase(const LilvPlugin &plug)
OptionalMessage LoadUserPreset(const RegistryPath &name, EffectSettings &settings) const override
OptionalMessage LoadFactoryPreset(int id, EffectSettings &settings) const override
ComponentInterfaceSymbol GetSymbol() const override
EffectType GetType() const override
Type determines how it behaves.
wxArrayString mFactoryPresetUris
const LV2FeaturesList mFeatures
bool mWantsOptionsInterface
LV2_URID_Map * URIDMapFeature() const
static ComponentInterfaceSymbol GetPluginSymbol(const LilvPlugin &plug)
void EmitPortValues(const LilvState &state, LV2EffectSettings &settings) const
LV2ControlPortArray mControlPorts
Holds a msgid for the translation catalog; may also bind format arguments.
bool SetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, const Value &value)
bool GetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, Value &var, const Value &defval)
DynamicRangeProcessorSettings GetSettings(EffectSettingsAccess &access)
std::string ToUTF8(const std::wstring &wstr)
Externalized state of a plug-in.