MCPcopy Create free account
hub / github.com/audacity/audacity / InitializePlugin

Method InitializePlugin

libraries/lib-lv2/LV2EffectBase.cpp:122–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122bool LV2EffectBase::InitializePlugin()
123{
124 if (!mFeatures.mOk)
125 return false;
126
127 // Do a check only on temporary feature list objects
128 auto instanceFeatures = LV2InstanceFeaturesList{ mFeatures };
129 if (!instanceFeatures.mOk)
130 return false;
131 if (!LV2InstanceFeaturesList::ValidatePlugin::Call(mPlug, instanceFeatures))
132 return false;
133
134 // Determine available extensions
135 mWantsOptionsInterface = false;
136 mWantsStateInterface = false;
137 if (LilvNodesPtr extdata{ lilv_plugin_get_extension_data(&mPlug) }) {
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)
142 mWantsOptionsInterface = true;
143 else if (strcmp(uri, LV2_STATE__interface) == 0)
144 mWantsStateInterface = true;
145 }
146 }
147
148 return true;
149}
150
151EffectSettings LV2EffectBase::MakeSettings() const
152{

Callers 2

DiscoverPluginsAtPathMethod · 0.45
LoadPluginMethod · 0.45

Calls 5

CallClass · 0.85
LILV_FOREACHFunction · 0.85
lilv_node_as_stringFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected