summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/BlockImpl.hpp2
-rw-r--r--src/server/Engine.cpp11
-rw-r--r--src/server/Engine.hpp1
3 files changed, 14 insertions, 0 deletions
diff --git a/src/server/BlockImpl.hpp b/src/server/BlockImpl.hpp
index 701e2188..a1ca11b7 100644
--- a/src/server/BlockImpl.hpp
+++ b/src/server/BlockImpl.hpp
@@ -182,6 +182,8 @@ public:
uint32_t num_ports() const { return _ports ? _ports->size() : 0; }
virtual uint32_t polyphony() const { return _polyphony; }
+ virtual LilvInstance* instance() { return nullptr; }
+
/** Mark used during graph compilation */
enum class Mark { UNVISITED, VISITING, VISITED };
Mark get_mark() const { return _mark; }
diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp
index 5f5c53d0..e2fb08af 100644
--- a/src/server/Engine.cpp
+++ b/src/server/Engine.cpp
@@ -399,6 +399,17 @@ Engine::init(double sample_rate, uint32_t block_length, size_t seq_size)
set_driver(SPtr<Driver>(new DirectDriver(*this, sample_rate, block_length, seq_size)));
}
+LilvInstance*
+Engine::block_instance(Node* node)
+{
+ BlockImpl* const block = dynamic_cast<BlockImpl*>(node);
+ if (!block) {
+ return nullptr;
+ }
+
+ return block->instance();
+}
+
bool
Engine::activate()
{
diff --git a/src/server/Engine.hpp b/src/server/Engine.hpp
index ab69586c..f735aedd 100644
--- a/src/server/Engine.hpp
+++ b/src/server/Engine.hpp
@@ -77,6 +77,7 @@ public:
// EngineBase methods
virtual void init(double sample_rate, uint32_t block_length, size_t seq_size);
+ virtual LilvInstance* block_instance(Node* node);
virtual bool activate();
virtual void deactivate();
virtual bool pending_events();