summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/NodeBase.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-08 08:11:59 +0000
committerDavid Robillard <d@drobilla.net>2007-04-08 08:11:59 +0000
commitb59584b387c4b77d09ba4c791eb711597f67c8c8 (patch)
treecef114efdfc9807124b243c09547cfb9f6004a48 /src/libs/engine/NodeBase.cpp
parente96c36c1a7abb062e36efc0ac95c35fedcef922e (diff)
downloadingen-b59584b387c4b77d09ba4c791eb711597f67c8c8.tar.gz
ingen-b59584b387c4b77d09ba4c791eb711597f67c8c8.tar.bz2
ingen-b59584b387c4b77d09ba4c791eb711597f67c8c8.zip
MIDI patching fixes (clean disconnecting).
git-svn-id: http://svn.drobilla.net/lad/ingen@416 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/NodeBase.cpp')
-rw-r--r--src/libs/engine/NodeBase.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/libs/engine/NodeBase.cpp b/src/libs/engine/NodeBase.cpp
index 7f9fe23b..ffd509c4 100644
--- a/src/libs/engine/NodeBase.cpp
+++ b/src/libs/engine/NodeBase.cpp
@@ -123,18 +123,31 @@ NodeBase::set_buffer_size(size_t size)
}
-/** Runs the Node for the specified number of frames (block size)
+/** Prepare to run a cycle (in the audio thread)
*/
void
-NodeBase::process(SampleCount nframes, FrameTime start, FrameTime end)
+NodeBase::pre_process(SampleCount nframes, FrameTime start, FrameTime end)
{
assert(_activated);
// Mix down any ports with multiple inputs
for (size_t i=0; i < _ports->size(); ++i)
- _ports->at(i)->process(nframes, start, end);
+ _ports->at(i)->pre_process(nframes, start, end);
}
+/** Prepare to run a cycle (in the audio thread)
+ */
+void
+NodeBase::post_process(SampleCount nframes, FrameTime start, FrameTime end)
+{
+ assert(_activated);
+ // Prepare any output ports for reading (MIDI)
+ for (size_t i=0; i < _ports->size(); ++i)
+ _ports->at(i)->post_process(nframes, start, end);
+}
+
+
+
/** Rename this Node.
*
* This is responsible for updating the ObjectStore so the Node can be