summaryrefslogtreecommitdiffstats
path: root/src/server/mix.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-11 05:22:08 +0000
committerDavid Robillard <d@drobilla.net>2012-03-11 05:22:08 +0000
commit4c299323440923891b9c583a354116000eb143cc (patch)
treef2873fdd9849561608b7eebbfad89c04d56ba58e /src/server/mix.hpp
parentc2ea4e3c59ce8c06066780d67237fdb07255c89e (diff)
downloadingen-4c299323440923891b9c583a354116000eb143cc.tar.gz
ingen-4c299323440923891b9c583a354116000eb143cc.tar.bz2
ingen-4c299323440923891b9c583a354116000eb143cc.zip
Implement cv:CVPort (fix #790). Not well-tested, but at least works somewhat.
Use new style LV2 URI defines (and fix invalid atom URIs). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4050 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/mix.hpp')
-rw-r--r--src/server/mix.hpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/server/mix.hpp b/src/server/mix.hpp
index c90c0e17..21040c52 100644
--- a/src/server/mix.hpp
+++ b/src/server/mix.hpp
@@ -38,17 +38,18 @@ mix(Context& context, Buffer* dst, const boost::intrusive_ptr<Buffer>* srcs, uin
switch (dst->type().symbol()) {
case PortType::AUDIO:
case PortType::CONTROL:
+ case PortType::CV:
// Copy the first source
dst->copy(context, srcs[0].get());
// Mix in the rest
for (uint32_t i = 1; i < num_srcs; ++i) {
- assert(srcs[i]->type() == PortType::AUDIO || srcs[i]->type() == PortType::CONTROL);
+ assert(srcs[i]->type() == PortType::AUDIO ||
+ srcs[i]->type() == PortType::CONTROL ||
+ srcs[i]->type() == PortType::CV);
((AudioBuffer*)dst)->accumulate(context, (AudioBuffer*)srcs[i].get());
}
-
break;
-
case PortType::EVENTS:
dst->clear();
for (uint32_t i = 0; i < num_srcs; ++i) {
@@ -75,10 +76,8 @@ mix(Context& context, Buffer* dst, const boost::intrusive_ptr<Buffer>* srcs, uin
break;
}
}
-
dst->rewind();
break;
-
default:
if (num_srcs == 1)
dst->copy(context, srcs[0].get());