summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/Connection.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/Connection.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/Connection.cpp')
-rw-r--r--src/libs/engine/Connection.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libs/engine/Connection.cpp b/src/libs/engine/Connection.cpp
index 5b45f6fc..0d54fe9f 100644
--- a/src/libs/engine/Connection.cpp
+++ b/src/libs/engine/Connection.cpp
@@ -20,7 +20,7 @@
#include "util.hpp"
#include "Connection.hpp"
#include "NodeImpl.hpp"
-#include "Port.hpp"
+#include "PortImpl.hpp"
#include "BufferFactory.hpp"
#include "AudioBuffer.hpp"
#include "ProcessContext.hpp"
@@ -33,7 +33,7 @@ namespace Ingen {
* This handles both polyphonic and monophonic nodes, transparently to the
* user (InputPort).
*/
-Connection::Connection(Port* src_port, Port* dst_port)
+Connection::Connection(PortImpl* src_port, PortImpl* dst_port)
: _src_port(src_port)
, _dst_port(dst_port)
, _local_buffer(NULL)
@@ -85,7 +85,7 @@ Connection::set_buffer_size(size_t size)
void
Connection::prepare_poly(uint32_t poly)
{
- if (type() == DataType::FLOAT)
+ if (type() == DataType::CONTROL || type() == DataType::AUDIO)
_must_mix = (poly > 1) && (
(_src_port->poly() != _dst_port->poly())
|| (_src_port->polyphonic() && !_dst_port->polyphonic())
@@ -123,7 +123,7 @@ Connection::process(ProcessContext& context)
* would avoid having to mix multiple times. Probably not a very common
* case, but it would be faster anyway. */
- if (_must_mix && type() == DataType::FLOAT) {
+ if (_must_mix && type() == DataType::CONTROL || type() == DataType::AUDIO) {
const AudioBuffer* const src_buffer = (AudioBuffer*)src_port()->buffer(0);
AudioBuffer* mix_buf = (AudioBuffer*)_local_buffer;