From 89a9cdf0ab581a4cff5cf8fd859d714a90bb8998 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 21 Oct 2007 17:47:49 +0000 Subject: Fix control port value broadcasting. git-svn-id: http://svn.drobilla.net/lad/ingen@893 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/InputPort.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/libs/engine/InputPort.cpp') diff --git a/src/libs/engine/InputPort.cpp b/src/libs/engine/InputPort.cpp index f64cf97b..7e5f6623 100644 --- a/src/libs/engine/InputPort.cpp +++ b/src/libs/engine/InputPort.cpp @@ -31,7 +31,12 @@ using namespace std; namespace Ingen { -InputPort::InputPort(NodeImpl* parent, const string& name, uint32_t index, uint32_t poly, DataType type, size_t buffer_size) +InputPort::InputPort(NodeImpl* parent, + const string& name, + uint32_t index, + uint32_t poly, + DataType type, + size_t buffer_size) : PortImpl(parent, name, index, poly, type, buffer_size) { } @@ -177,7 +182,8 @@ InputPort::pre_process(ProcessContext& context) buffer(i)->prepare_read(context.nframes()); /*cerr << path() << " poly = " << _poly << ", mixdown: " << do_mixdown - << ", fixed buffers: " << _fixed_buffers << endl; + << ", fixed buffers: " << _fixed_buffers << ", joined: " << _buffers->at(0)->is_joined() + << " to " << _buffers->at(0)->joined_buffer() << endl; if (type() == DataType::MIDI) for (uint32_t i=0; i < _poly; ++i) @@ -230,7 +236,12 @@ InputPort::post_process(ProcessContext& context) for (uint32_t i=0; i < _poly; ++i) buffer(i)->prepare_write(context.nframes()); - //cerr << path() << " input post: buffer: " << buffer(0) << endl; + /*if (_broadcast && (_type == DataType::CONTROL)) { + const Sample value = ((AudioBuffer*)(*_buffers)[0])->value_at(0); + + cerr << path() << " input post: buffer: " << buffer(0) << " value = " + << value << " (last " << _last_broadcasted_value << ")" <