diff options
author | David Robillard <d@drobilla.net> | 2010-10-17 01:11:29 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-10-17 01:11:29 +0000 |
commit | 5a1ccca68baf9e8efffe3e0297730a911617693d (patch) | |
tree | 675764eb06e152f09b1d97c317d445a8050f253a /src/engine/ConnectionImpl.cpp | |
parent | 78f786d90943cd63eb5db761e910169990c66d93 (diff) | |
download | ingen-5a1ccca68baf9e8efffe3e0297730a911617693d.tar.gz ingen-5a1ccca68baf9e8efffe3e0297730a911617693d.tar.bz2 ingen-5a1ccca68baf9e8efffe3e0297730a911617693d.zip |
Support current versions of LV2 atom, atom-port, and context extensions.
Working use case in this revision: lolep.parse => lolep.print (set parse input
to some string, it will be parsed, send to print as an LV2 atom, then
printed to the console by print).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2631 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/ConnectionImpl.cpp')
-rw-r--r-- | src/engine/ConnectionImpl.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/engine/ConnectionImpl.cpp b/src/engine/ConnectionImpl.cpp index c308cea5..43f9136a 100644 --- a/src/engine/ConnectionImpl.cpp +++ b/src/engine/ConnectionImpl.cpp @@ -129,16 +129,28 @@ ConnectionImpl::can_connect(const OutputPort* src, const InputPort* dst) { const LV2URIMap& uris = src->bufs().uris(); return ( + // (Audio | Control) => (Audio | Control) ( (src->is_a(PortType::CONTROL) || src->is_a(PortType::AUDIO)) && (dst->is_a(PortType::CONTROL) || dst->is_a(PortType::AUDIO))) - || ( src->is_a(PortType::EVENTS) && src->context() == Context::AUDIO - && dst->is_a(PortType::MESSAGE) && dst->context() == Context::MESSAGE) - || ( src->is_a(PortType::MESSAGE) && src->context() == Context::MESSAGE - && dst->is_a(PortType::EVENTS) && dst->context() == Context::AUDIO) - || (src->is_a(PortType::EVENTS) && dst->is_a(PortType::EVENTS)) + + // (Events | Message) => (Events | Message) + || ( (src->is_a(PortType::EVENTS) || src->is_a(PortType::MESSAGE)) + && (dst->is_a(PortType::EVENTS) || dst->is_a(PortType::MESSAGE))) + + // (Message | Value) => (Message | Value) + || ( (src->is_a(PortType::MESSAGE) || src->is_a(PortType::VALUE)) + && (dst->is_a(PortType::MESSAGE) || dst->is_a(PortType::VALUE))) + + // Control => atom:Float32 Value || (src->is_a(PortType::CONTROL) && dst->supports(uris.object_class_float32)) + + // Audio => atom:Vector Value || (src->is_a(PortType::AUDIO) && dst->supports(uris.object_class_vector)) + + // atom:Float32 Value => Control || (src->supports(uris.object_class_float32) && dst->is_a(PortType::CONTROL)) + + // atom:Vector Value => Audio || (src->supports(uris.object_class_vector) && dst->is_a(PortType::AUDIO))); } |