diff options
author | David Robillard <d@drobilla.net> | 2025-06-06 12:03:30 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2025-06-06 12:03:30 -0400 |
commit | 13a045d01c7a77fc918b7f496f5bf96ade4f6812 (patch) | |
tree | 0df9319a44c69d73663fdc427720e2660fdbc338 | |
parent | 6e02a3e2e60ffdcebdb2a244dd11e500e108c6bb (diff) | |
download | ingen-13a045d01c7a77fc918b7f496f5bf96ade4f6812.tar.gz ingen-13a045d01c7a77fc918b7f496f5bf96ade4f6812.tar.bz2 ingen-13a045d01c7a77fc918b7f496f5bf96ade4f6812.zip |
"Empty" features (features with no data) previously weren't passed to the
plugin but this breaks plugins that are checking for required host
feature. Specifically, this fixes JUCE plugins that require
bufsz:boundedBlockLength.
-rw-r--r-- | include/ingen/LV2Features.hpp | 5 | ||||
-rw-r--r-- | src/LV2Features.cpp | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/include/ingen/LV2Features.hpp b/include/ingen/LV2Features.hpp index 41bdf848..fe6fd707 100644 --- a/include/ingen/LV2Features.hpp +++ b/include/ingen/LV2Features.hpp @@ -59,10 +59,7 @@ public: const char* uri() const override { return _uri; } - std::shared_ptr<LV2_Feature> feature(World& world, Node* block) override - { - return nullptr; - } + std::shared_ptr<LV2_Feature> feature(World& world, Node* block) override; const char* _uri; }; diff --git a/src/LV2Features.cpp b/src/LV2Features.cpp index c33ba4c4..73cc9382 100644 --- a/src/LV2Features.cpp +++ b/src/LV2Features.cpp @@ -31,6 +31,12 @@ LV2Features::Feature::free_feature(LV2_Feature* feature) free(feature); } +std::shared_ptr<LV2_Feature> +LV2Features::EmptyFeature::feature(World& world, Node* block) +{ + return std::make_shared<LV2_Feature>(LV2_Feature{_uri, nullptr}); +} + void LV2Features::add_feature(const std::shared_ptr<Feature>& feature) { |