diff options
author | David Robillard <d@drobilla.net> | 2009-11-14 20:44:40 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-11-14 20:44:40 +0000 |
commit | 6ae2018e81e7e81e4906e62dc6224ad34298d9c2 (patch) | |
tree | 11286438977c4f975b5148dc93b5f4dfafabdbdc /src/engine/PortImpl.cpp | |
parent | cfec427867f42d7aa7bea6dfbb0736b5ce99e9e2 (diff) | |
download | ingen-6ae2018e81e7e81e4906e62dc6224ad34298d9c2.tar.gz ingen-6ae2018e81e7e81e4906e62dc6224ad34298d9c2.tar.bz2 ingen-6ae2018e81e7e81e4906e62dc6224ad34298d9c2.zip |
Object extension.
Port resize extension.
Sensible extension(s) implementation design for Ingen.
Replace string port extension support in Ingen with Object port extension.
Implement port resize extension in Ingen.
Some test plugins for this stuff.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2260 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/PortImpl.cpp')
-rw-r--r-- | src/engine/PortImpl.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/engine/PortImpl.cpp b/src/engine/PortImpl.cpp index 7559ae02..20d0b682 100644 --- a/src/engine/PortImpl.cpp +++ b/src/engine/PortImpl.cpp @@ -23,10 +23,12 @@ #include "events/SendPortActivity.hpp" #include "AudioBuffer.hpp" #include "EventBuffer.hpp" +#include "Engine.hpp" +#include "LV2Object.hpp" #include "NodeImpl.hpp" +#include "ObjectBuffer.hpp" #include "PortImpl.hpp" #include "ProcessContext.hpp" -#include "StringBuffer.hpp" using namespace std; using namespace Raul; @@ -69,7 +71,7 @@ PortImpl::PortImpl(NodeImpl* const node, add_property("rdf:type", Atom(Atom::URI, type.uri())); - if (type == DataType::EVENT) + if (type == DataType::EVENTS) _broadcast = true; // send activity blips assert(_buffers->size() > 0); @@ -176,7 +178,7 @@ PortImpl::clear_buffers() void -PortImpl::broadcast_value(ProcessContext& context, bool force) +PortImpl::broadcast_value(Context& context, bool force) { Raul::Atom val; switch (_type.symbol()) { @@ -186,14 +188,14 @@ PortImpl::broadcast_value(ProcessContext& context, bool force) case DataType::CONTROL: val = ((AudioBuffer*)buffer(0))->value_at(0); break; - case DataType::EVENT: + case DataType::EVENTS: if (((EventBuffer*)buffer(0))->event_count() > 0) { const Events::SendPortActivity ev(context.engine(), context.start(), this); context.event_sink().write(sizeof(ev), &ev); } break; - case DataType::STRING: - val = Raul::Atom(((StringBuffer*)buffer(0))->data()); + case DataType::OBJECT: + LV2Object::to_atom(context.engine().world(), ((ObjectBuffer*)buffer(0))->data(), val); break; } |