diff options
author | David Robillard <d@drobilla.net> | 2006-06-21 03:27:16 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-06-21 03:27:16 +0000 |
commit | a603f4a917bd5a7d806ff8394e2bfbe0f64acc64 (patch) | |
tree | cb2fe94e1bb08c8d603918bf94d8ee362e98d4eb /src/libs/engine/InputPort.cpp | |
parent | 032d526710d174b30e0c9f33ff9f7e60e99fb172 (diff) | |
download | ingen-a603f4a917bd5a7d806ff8394e2bfbe0f64acc64.tar.gz ingen-a603f4a917bd5a7d806ff8394e2bfbe0f64acc64.tar.bz2 ingen-a603f4a917bd5a7d806ff8394e2bfbe0f64acc64.zip |
Got the audio flowing
git-svn-id: http://svn.drobilla.net/lad/grauph@70 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/InputPort.cpp')
-rw-r--r-- | src/libs/engine/InputPort.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/libs/engine/InputPort.cpp b/src/libs/engine/InputPort.cpp index 960972e5..ab7ca562 100644 --- a/src/libs/engine/InputPort.cpp +++ b/src/libs/engine/InputPort.cpp @@ -235,12 +235,14 @@ InputPort<sample>::process(samplecount nframes) m_buffers.at(0)->join((*m_connections.begin())->buffer(0)); do_mixdown = false; } + update_buffers(); } else { do_mixdown = false; } - update_buffers(); } + //cerr << path() << " mixing: " << do_mixdown << endl; + if (!do_mixdown) { assert(m_buffers.at(0)->data() == (*m_connections.begin())->buffer(0)->data()); return; @@ -250,13 +252,14 @@ InputPort<sample>::process(samplecount nframes) assert(!m_is_tied || m_buffers.at(0)->data() == m_tied_port->buffer(0)->data());*/ for (size_t voice=0; voice < _poly; ++voice) { + // Copy first connection m_buffers.at(voice)->copy((*m_connections.begin())->buffer(voice), 0, _buffer_size-1); + // Accumulate the rest if (m_connections.size() > 1) { - // Copy first connection + TypedConnectionListIterator c = m_connections.begin(); - - // Add all other connections + for (++c; c != m_connections.end(); ++c) m_buffers.at(voice)->accumulate((*c)->buffer(voice), 0, _buffer_size-1); } @@ -271,7 +274,7 @@ InputPort<sample>::process(samplecount nframes) template <> void InputPort<MidiMessage>::process(samplecount nframes) -{ +{ //assert(!m_is_tied || m_tied_port != NULL); const size_t num_ins = m_connections.size(); |