20 , mOk{ InitializeOptions() }
46 lilv_plugin_get_uri(&
mPlug), node_MinBlockLength,
nullptr) }
47 ; lilv_node_is_int(minLength.get())
49 if (
auto value = lilv_node_as_int(minLength.get())
55 lilv_plugin_get_uri(&
mPlug), node_MaxBlockLength,
nullptr) }
56 ; lilv_node_is_int(maxLength.get())
58 if (
auto value = lilv_node_as_int(maxLength.get())
69 LV2_URID
key, uint32_t
size, LV2_URID type,
const void *value)
73 mOptions.emplace_back(LV2_Options_Option{
74 LV2_OPTIONS_INSTANCE, 0,
key,
size, type, value });
76 mOptions.emplace_back(LV2_Options_Option{});
80const LV2_Options_Option *
95 const LilvNode *subject,
bool required)
98 bool supported =
true;
99 const auto predicate =
100 required ? node_RequiredOption : node_SupportedOption;
102 lilv_world_find_nodes(
gWorld, subject, predicate,
nullptr) }
104 LILV_FOREACH(nodes, i, nodes.get()) {
105 const auto node = lilv_nodes_get(nodes.get(), i);
106 const auto uri = lilv_node_as_string(node);
110 if (urid == urid_NominalBlockLength)
117 [&](
const auto &option){ return option.key == urid; }));
119 wxLogError(
wxT(
"%s requires unsupported option %s"),
120 lilv_node_as_string(lilv_plugin_get_uri(&
mPlug)), uri);
131 const LV2_Worker_Schedule *pWorkerSchedule
135 auto &base = baseFeatures.
Base();
136 if (base.SuppliesWorkerInterface()) {
138 AddFeature( LV2_WORKER__schedule, pWorkerSchedule );
constexpr WithBase_t WithBase
Lilv_ptr< LilvNodes, lilv_nodes_free > LilvNodesPtr
Lilv_ptr< LilvNode, lilv_node_free > LilvNodePtr
Extends one (immutable) feature list (whose lifetime contains this one's)
void AddFeature(const char *uri, const void *data)
const LV2FeaturesListBase & mBaseFeatures
constexpr auto sampleRate
const char * end(const char *str) noexcept
bool ValidateOptions(const LilvNode *subject)
bool CheckOptions(const LilvNode *subject, bool required)
size_t AddOption(LV2_URID, uint32_t size, LV2_URID, const void *value)
LV2InstanceFeaturesList(const LV2FeaturesList &baseFeatures)
const LV2_Options_Option * NominalBlockLengthOption() const
const LV2FeaturesList & Base() const
bool mSupportsNominalBlockLength
std::vector< LV2_Options_Option > mOptions
LV2WrapperFeaturesList(LV2InstanceFeaturesList &baseFeatures, float sampleRate=44100.0f, const LV2_Worker_Schedule *pWorkerSchedule=nullptr)