From df8ee18c0139f889bf7c697713a2205364845464 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 25 Jan 2008 06:55:57 +0000 Subject: Overhaul SLV2 API to return/take SLV2Value (instead of strings or primitives) wherever possible. Make 'index' a fundemental property of ingen ports. git-svn-id: http://svn.drobilla.net/lad/ingen@1113 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/PortImpl.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/libs/engine/PortImpl.cpp') diff --git a/src/libs/engine/PortImpl.cpp b/src/libs/engine/PortImpl.cpp index 4fc61c20..9500aab1 100644 --- a/src/libs/engine/PortImpl.cpp +++ b/src/libs/engine/PortImpl.cpp @@ -37,15 +37,17 @@ PortImpl::PortImpl(NodeImpl* const node, uint32_t index, uint32_t poly, DataType type, + const Atom& value, size_t buffer_size) : GraphObjectImpl(node, name, (type == DataType::AUDIO || type == DataType::CONTROL)) , _index(index) , _poly(poly) , _buffer_size(buffer_size) , _type(type) + , _value(value) , _fixed_buffers(false) , _broadcast(false) - , _last_broadcasted_value(0.0f) // default? + , _last_broadcasted_value(_value) // default? , _buffers(new Raul::Array(poly)) { assert(node != NULL); @@ -59,6 +61,8 @@ PortImpl::PortImpl(NodeImpl* const node, if (type == DataType::EVENT) _broadcast = true; // send activity blips + + set_variable("ingen:default", value); assert(_buffers->size() > 0); } @@ -122,14 +126,6 @@ PortImpl::apply_poly(Raul::Maid& maid, uint32_t poly) } -Raul::Atom -PortImpl::value() const -{ - // FIXME: will need this for ingen-side serialization - throw; -} - - void PortImpl::allocate_buffers() { -- cgit v1.2.1