summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/InputPort.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-07 23:09:48 +0000
committerDavid Robillard <d@drobilla.net>2007-10-07 23:09:48 +0000
commit971c02f3707c4872a2da9a3b946b6508290c5ab4 (patch)
tree1dd28dabb27f75a1c5fc79bb583e50c8ec98974f /src/libs/engine/InputPort.cpp
parent288a04a65de1ff86ff0ca6e02e611f83e881d159 (diff)
downloadingen-971c02f3707c4872a2da9a3b946b6508290c5ab4.tar.gz
ingen-971c02f3707c4872a2da9a3b946b6508290c5ab4.tar.bz2
ingen-971c02f3707c4872a2da9a3b946b6508290c5ab4.zip
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
Diffstat (limited to 'src/libs/engine/InputPort.cpp')
-rw-r--r--src/libs/engine/InputPort.cpp14
1 files changed, 7 insertions, 7 deletions
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<Connection*>::iterator c = _connections.begin(); c != _connections.end(); ++c)
@@ -74,11 +74,11 @@ InputPort::add_connection(Raul::ListNode<Connection*>* 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(