summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-06-09 02:27:16 +0000
committerDavid Robillard <d@drobilla.net>2013-06-09 02:27:16 +0000
commit2a37fbef6832aebfcb22feefa0bb05104eb6f018 (patch)
tree5e161bce0a7e0e6c5b66659693a139bff8520ec2 /src/server/events
parent947b2ebaee2a4a6e5b59ec90856dd66eae63b3f2 (diff)
downloadingen-2a37fbef6832aebfcb22feefa0bb05104eb6f018.tar.gz
ingen-2a37fbef6832aebfcb22feefa0bb05104eb6f018.tar.bz2
ingen-2a37fbef6832aebfcb22feefa0bb05104eb6f018.zip
Inherit certain properties from ports connected to patch ports.
This is a bit too hard-edged at present, but does the right thing when building a patch from scratch at least. Something needs to be done about removing the properties, but this is hard for outputs since the arcs aren't keyed that way. The main problem here is that Ardour barfs on plugins with MIDI input for audio tracks, so if you *ever* connect the control input to a MIDI anything, it will stick and not work in an Ardour audio track. Maybe it should be just implemented for inputs as a stop gap... git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5136 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/Connect.cpp11
-rw-r--r--src/server/events/Connect.hpp4
2 files changed, 15 insertions, 0 deletions
diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp
index 4c4a3974..75659452 100644
--- a/src/server/events/Connect.cpp
+++ b/src/server/events/Connect.cpp
@@ -124,6 +124,9 @@ Connect::pre_process()
_graph->add_arc(_arc);
_head->increment_num_arcs();
+
+ tail_output->inherit_neighbour(_head, _tail_remove, _tail_add);
+ _head->inherit_neighbour(tail_output, _head_remove, _head_add);
}
_buffers = new Raul::Array<BufferRef>(_head->poly());
@@ -156,6 +159,14 @@ Connect::post_process()
Broadcaster::Transfer t(*_engine.broadcaster());
if (respond() == Status::SUCCESS) {
_engine.broadcaster()->connect(_tail_path, _head_path);
+ if (!_tail_remove.empty() || !_tail_add.empty()) {
+ _engine.broadcaster()->delta(
+ Node::path_to_uri(_tail_path), _tail_remove, _tail_add);
+ }
+ if (!_tail_remove.empty() || !_tail_add.empty()) {
+ _engine.broadcaster()->delta(
+ Node::path_to_uri(_tail_path), _tail_remove, _tail_add);
+ }
}
}
diff --git a/src/server/events/Connect.hpp b/src/server/events/Connect.hpp
index 4b515087..d5e58a99 100644
--- a/src/server/events/Connect.hpp
+++ b/src/server/events/Connect.hpp
@@ -64,6 +64,10 @@ private:
CompiledGraph* _compiled_graph;
SPtr<ArcImpl> _arc;
Raul::Array<BufferRef>* _buffers;
+ Resource::Properties _tail_remove;
+ Resource::Properties _tail_add;
+ Resource::Properties _head_remove;
+ Resource::Properties _head_add;
};
} // namespace Events