summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-03-25 02:12:09 +0000
committerDavid Robillard <d@drobilla.net>2013-03-25 02:12:09 +0000
commit3d93d33c8a1245351473a58229055b40fce86db1 (patch)
tree7c92b87097a85d7e9a1382e8eabc3dd2e3bf236b
parent29c8bfe6d5a9bce0df87176ccd8ac1b1d7db6002 (diff)
downloadingen-3d93d33c8a1245351473a58229055b40fce86db1.tar.gz
ingen-3d93d33c8a1245351473a58229055b40fce86db1.tar.bz2
ingen-3d93d33c8a1245351473a58229055b40fce86db1.zip
Explicitly support bufsz block length features (fix #893).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5102 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--ingen/LV2Features.hpp13
-rw-r--r--src/server/Engine.cpp11
-rw-r--r--src/server/Worker.cpp1
3 files changed, 24 insertions, 1 deletions
diff --git a/ingen/LV2Features.hpp b/ingen/LV2Features.hpp
index 2efd62f8..61180636 100644
--- a/ingen/LV2Features.hpp
+++ b/ingen/LV2Features.hpp
@@ -47,6 +47,19 @@ public:
Node* block) = 0;
};
+ class EmptyFeature : public Feature {
+ public:
+ EmptyFeature(const char* uri) : _uri(uri) {}
+
+ virtual const char* uri() const { return _uri; }
+
+ virtual SPtr<LV2_Feature> feature(World* world, Node* block) {
+ return SPtr<LV2_Feature>();
+ }
+
+ const char* _uri;
+ };
+
class FeatureArray : public Raul::Noncopyable {
public:
typedef std::vector< SPtr<LV2_Feature> > FeatureVector;
diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp
index 2e7a942a..755e0d65 100644
--- a/src/server/Engine.cpp
+++ b/src/server/Engine.cpp
@@ -16,6 +16,8 @@
#include <sys/mman.h>
+#include "lv2/lv2plug.in/ns/ext/buf-size/buf-size.h"
+
#include "events/CreatePort.hpp"
#include "ingen/Configuration.hpp"
#include "ingen/Log.hpp"
@@ -77,6 +79,15 @@ Engine::Engine(Ingen::World* world)
_world->lv2_features().add_feature(_worker->schedule_feature());
_world->lv2_features().add_feature(_options);
+ _world->lv2_features().add_feature(
+ SPtr<LV2Features::Feature>(
+ new LV2Features::EmptyFeature(LV2_BUF_SIZE__powerOf2BlockLength)));
+ _world->lv2_features().add_feature(
+ SPtr<LV2Features::Feature>(
+ new LV2Features::EmptyFeature(LV2_BUF_SIZE__fixedBlockLength)));
+ _world->lv2_features().add_feature(
+ SPtr<LV2Features::Feature>(
+ new LV2Features::EmptyFeature(LV2_BUF_SIZE__boundedBlockLength)));
}
Engine::~Engine()
diff --git a/src/server/Worker.cpp b/src/server/Worker.cpp
index ce7ba833..d5bb0785 100644
--- a/src/server/Worker.cpp
+++ b/src/server/Worker.cpp
@@ -97,7 +97,6 @@ Worker::Schedule::feature(World* world, Node* n)
f->data = data;
return SPtr<LV2_Feature>(f, &delete_feature);
-
}
Worker::Worker(Log& log, uint32_t buffer_size)