From b59584b387c4b77d09ba4c791eb711597f67c8c8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 8 Apr 2007 08:11:59 +0000 Subject: MIDI patching fixes (clean disconnecting). git-svn-id: http://svn.drobilla.net/lad/ingen@416 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/NodeBase.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/libs/engine/NodeBase.cpp') 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 -- cgit v1.2.1