From 971c02f3707c4872a2da9a3b946b6508290c5ab4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 7 Oct 2007 23:09:48 +0000 Subject: Added shared abstract interface for ports. Moved DataType to shared. Switch data type URIs to match LV2 type semantics (e.g. separate audio/control types). git-svn-id: http://svn.drobilla.net/lad/ingen@840 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/InputPort.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/libs/engine/InputPort.cpp') diff --git a/src/libs/engine/InputPort.cpp b/src/libs/engine/InputPort.cpp index 678e3d8d..6a4de550 100644 --- a/src/libs/engine/InputPort.cpp +++ b/src/libs/engine/InputPort.cpp @@ -32,7 +32,7 @@ namespace Ingen { InputPort::InputPort(NodeImpl* parent, const string& name, uint32_t index, uint32_t poly, DataType type, size_t buffer_size) - : Port(parent, name, index, poly, type, buffer_size) + : PortImpl(parent, name, index, poly, type, buffer_size) { } @@ -40,7 +40,7 @@ InputPort::InputPort(NodeImpl* parent, const string& name, uint32_t index, uint3 void InputPort::set_buffer_size(size_t size) { - Port::set_buffer_size(size); + PortImpl::set_buffer_size(size); assert(_buffer_size = size); for (Raul::List::iterator c = _connections.begin(); c != _connections.end(); ++c) @@ -74,11 +74,11 @@ InputPort::add_connection(Raul::ListNode* const c) _buffers->at(i)->unjoin(); } } - Port::connect_buffers(); + PortImpl::connect_buffers(); } // Automatically broadcast connected control inputs - if (_type == DataType::FLOAT && _buffer_size == 1) + if (_type == DataType::CONTROL) _broadcast = true; } @@ -119,10 +119,10 @@ InputPort::remove_connection(const OutputPort* src_port) } if (modify_buffers) - Port::connect_buffers(); + PortImpl::connect_buffers(); // Turn off broadcasting if we're not connected any more (FIXME: not quite right..) - if (_type == DataType::FLOAT && _buffer_size == 1 && _connections.size() == 0) + if (_type == DataType::CONTROL && _connections.size() == 0) _broadcast = false; return connection; @@ -184,7 +184,7 @@ InputPort::pre_process(ProcessContext& context) return; } - if (_type == DataType::FLOAT) { + if (_type == DataType::CONTROL || _type == DataType::AUDIO) { for (uint32_t voice=0; voice < _poly; ++voice) { // Copy first connection _buffers->at(voice)->copy( -- cgit v1.2.1