From a603f4a917bd5a7d806ff8394e2bfbe0f64acc64 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 21 Jun 2006 03:27:16 +0000 Subject: Got the audio flowing git-svn-id: http://svn.drobilla.net/lad/grauph@70 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/InputPort.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/libs/engine/InputPort.cpp') 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::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::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::process(samplecount nframes) template <> void InputPort::process(samplecount nframes) -{ +{ //assert(!m_is_tied || m_tied_port != NULL); const size_t num_ins = m_connections.size(); -- cgit v1.2.1