diff options
author | David Robillard <d@drobilla.net> | 2012-03-11 05:22:08 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-03-11 05:22:08 +0000 |
commit | 4c299323440923891b9c583a354116000eb143cc (patch) | |
tree | f2873fdd9849561608b7eebbfad89c04d56ba58e /src/server/events | |
parent | c2ea4e3c59ce8c06066780d67237fdb07255c89e (diff) | |
download | ingen-4c299323440923891b9c583a354116000eb143cc.tar.gz ingen-4c299323440923891b9c583a354116000eb143cc.tar.bz2 ingen-4c299323440923891b9c583a354116000eb143cc.zip |
Implement cv:CVPort (fix #790). Not well-tested, but at least works somewhat.
Use new style LV2 URI defines (and fix invalid atom URIs).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4050 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events')
-rw-r--r-- | src/server/events/CreatePort.cpp | 2 | ||||
-rw-r--r-- | src/server/events/Disconnect.cpp | 5 | ||||
-rw-r--r-- | src/server/events/SetMetadata.cpp | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp index 1df393ca..9c519981 100644 --- a/src/server/events/CreatePort.cpp +++ b/src/server/events/CreatePort.cpp @@ -72,6 +72,8 @@ CreatePort::CreatePort(Engine& engine, _data_type = PortType::AUDIO; } else if (type == uris.lv2_ControlPort) { _data_type = PortType::CONTROL; + } else if (type == uris.cv_CVPort) { + _data_type = PortType::CV; } else if (type == uris.ev_EventPort) { _data_type = PortType::EVENTS; } else if (type == uris.atom_ValuePort) { diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp index aa5c4edb..01313208 100644 --- a/src/server/events/Disconnect.cpp +++ b/src/server/events/Disconnect.cpp @@ -98,8 +98,9 @@ Disconnect::Impl::Impl(Engine& e, _dst_input_port->get_buffers(*_engine.buffer_factory(), _buffers, _dst_input_port->poly()); - const bool is_control = _dst_input_port->is_a(PortType::CONTROL); - const float value = is_control ? _dst_input_port->value().get_float() : 0; + const bool is_control = _dst_input_port->is_a(PortType::CONTROL) || + _dst_input_port->is_a(PortType::CV); + const float value = is_control ? _dst_input_port->value().get_float() : 0; for (uint32_t i = 0; i < _buffers->size(); ++i) { if (is_control) { PtrCast<AudioBuffer>(_buffers->at(i))->set_value(value, 0, 0); diff --git a/src/server/events/SetMetadata.cpp b/src/server/events/SetMetadata.cpp index 4d6f6497..720cf3ba 100644 --- a/src/server/events/SetMetadata.cpp +++ b/src/server/events/SetMetadata.cpp @@ -195,7 +195,7 @@ SetMetadata::pre_process() ev->pre_process(); _set_events.push_back(ev); } else if (key == uris.ingen_controlBinding) { - if (port->is_a(PortType::CONTROL)) { + if (port->is_a(PortType::CONTROL) || port->is_a(PortType::CV)) { if (value == uris.wildcard) { _engine.control_bindings()->learn(port); } else if (value.type() == Atom::DICT) { |