diff options
author | David Robillard <d@drobilla.net> | 2009-05-11 19:31:17 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-05-11 19:31:17 +0000 |
commit | cb5287d0379287c461a0ac5b950161244a7fa53b (patch) | |
tree | 135aa05d505614ab3a503a3df96324b8a3026126 /src/engine/ConnectionImpl.cpp | |
parent | 698c38587bd4f0133a132dc363098ff8298ec47b (diff) | |
download | ingen-cb5287d0379287c461a0ac5b950161244a7fa53b.tar.gz ingen-cb5287d0379287c461a0ac5b950161244a7fa53b.tar.bz2 ingen-cb5287d0379287c461a0ac5b950161244a7fa53b.zip |
Fix subpatch MIDI IO.
Fixes tickets #323 and #332.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1974 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/ConnectionImpl.cpp')
-rw-r--r-- | src/engine/ConnectionImpl.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/engine/ConnectionImpl.cpp b/src/engine/ConnectionImpl.cpp index b9d5e2af..79361295 100644 --- a/src/engine/ConnectionImpl.cpp +++ b/src/engine/ConnectionImpl.cpp @@ -23,9 +23,6 @@ #include "AudioBuffer.hpp" #include "ProcessContext.hpp" -/*#include <iostream> -using namespace std;*/ - namespace Ingen { @@ -77,9 +74,9 @@ ConnectionImpl::set_mode() _mode = COPY; else if (must_extend()) _mode = EXTEND; - - if (type() == DataType::EVENT) - _mode = DIRECT; // FIXME: kludge + + if (_mode == MIX && type() == DataType::EVENT) + _mode = COPY; } @@ -166,16 +163,15 @@ ConnectionImpl::process(ProcessContext& context) * would avoid having to mix multiple times. Probably not a very common * case, but it would be faster anyway. */ - /*cerr << src_port()->path() << " * " << src_port()->poly() + /*std::cerr << src_port()->path() << " * " << src_port()->poly() << " -> " << dst_port()->path() << " * " << dst_port()->poly() - << "\t\tmode: " << (int)_mode << endl;*/ + << "\t\tmode: " << (int)_mode << std::endl;*/ if (_mode == COPY) { assert(src_port()->poly() == dst_port()->poly()); const size_t copy_size = std::min(src_port()->buffer_size(), dst_port()->buffer_size()); - for (uint32_t i=0; i < src_port()->poly(); ++i) { + for (uint32_t i=0; i < src_port()->poly(); ++i) dst_port()->buffer(i)->copy(src_port()->buffer(i), 0, copy_size-1); - } } else if (_mode == MIX) { assert(type() == DataType::AUDIO || type() == DataType::CONTROL); |