diff options
author | David Robillard <d@drobilla.net> | 2009-11-14 20:44:40 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-11-14 20:44:40 +0000 |
commit | 6ae2018e81e7e81e4906e62dc6224ad34298d9c2 (patch) | |
tree | 11286438977c4f975b5148dc93b5f4dfafabdbdc /src/engine/InputPort.cpp | |
parent | cfec427867f42d7aa7bea6dfbb0736b5ce99e9e2 (diff) | |
download | ingen-6ae2018e81e7e81e4906e62dc6224ad34298d9c2.tar.gz ingen-6ae2018e81e7e81e4906e62dc6224ad34298d9c2.tar.bz2 ingen-6ae2018e81e7e81e4906e62dc6224ad34298d9c2.zip |
Object extension.
Port resize extension.
Sensible extension(s) implementation design for Ingen.
Replace string port extension support in Ingen with Object port extension.
Implement port resize extension in Ingen.
Some test plugins for this stuff.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2260 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/InputPort.cpp')
-rw-r--r-- | src/engine/InputPort.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/engine/InputPort.cpp b/src/engine/InputPort.cpp index 31cb3e92..5d3a0627 100644 --- a/src/engine/InputPort.cpp +++ b/src/engine/InputPort.cpp @@ -188,7 +188,7 @@ InputPort::remove_connection(const OutputPort* src_port) /** Prepare buffer for access, mixing if necessary. Realtime safe. */ void -InputPort::pre_process(ProcessContext& context) +InputPort::pre_process(Context& context) { // If value has been set (e.g. events pushed) by the user, // don't do anything this cycle to avoid smashing the value @@ -198,7 +198,7 @@ InputPort::pre_process(ProcessContext& context) // No connections, just prepare buffers for reading by our node if (_connections.size() == 0) { for (uint32_t i=0; i < _poly; ++i) - buffer(i)->prepare_read(context.start(), context.nframes()); + buffer(i)->prepare_read(context); return; } @@ -210,7 +210,7 @@ InputPort::pre_process(ProcessContext& context) if (can_direct()) { for (uint32_t i=0; i < _poly; ++i) { _buffers->at(i)->join(_connections.front()->buffer(i)); - _buffers->at(i)->prepare_read(context.start(), context.nframes()); + _buffers->at(i)->prepare_read(context); } connect_buffers(); return; @@ -235,8 +235,7 @@ InputPort::pre_process(ProcessContext& context) if (_type == DataType::CONTROL || _type == DataType::AUDIO) { for (uint32_t voice=0; voice < _poly; ++voice) { // Copy first connection - buffer(voice)->copy( - _connections.front()->buffer(voice), 0, _buffer_size-1); + buffer(voice)->copy(context, _connections.front()->buffer(voice)); // Accumulate the rest if (_connections.size() > 1) { @@ -254,11 +253,11 @@ InputPort::pre_process(ProcessContext& context) cerr << "WARNING: MIDI mixing not implemented, only first connection used." << endl; // Copy first connection - buffer(0)->copy(_connections.front()->buffer(0), 0, _buffer_size-1); + buffer(0)->copy(context, _connections.front()->buffer(0)); } for (uint32_t i=0; i < _poly; ++i) - buffer(i)->prepare_read(context.start(), context.nframes()); + buffer(i)->prepare_read(context); if (_broadcast) broadcast_value(context, false); @@ -266,12 +265,12 @@ InputPort::pre_process(ProcessContext& context) void -InputPort::post_process(ProcessContext& context) +InputPort::post_process(Context& context) { // Prepare buffers for next cycle if (!can_direct()) for (uint32_t i=0; i < _poly; ++i) - buffer(i)->prepare_write(context.start(), context.nframes()); + buffer(i)->prepare_write(context); _set_by_user = false; |