summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/Patch.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-09-18 02:10:46 +0000
committerDavid Robillard <d@drobilla.net>2007-09-18 02:10:46 +0000
commit522f76df63657baa81cc2bedc7cc2c37679624ff (patch)
treea20686ff5163459cbc0a34de9440cd9b0fd9c5fe /src/libs/engine/Patch.cpp
parentc7c29dfbbd6b237aada410ed36d5dcaaed8efbc8 (diff)
downloadingen-522f76df63657baa81cc2bedc7cc2c37679624ff.tar.gz
ingen-522f76df63657baa81cc2bedc7cc2c37679624ff.tar.bz2
ingen-522f76df63657baa81cc2bedc7cc2c37679624ff.zip
Fix destroying connected patch ports, and patch port threading issues.
git-svn-id: http://svn.drobilla.net/lad/ingen@718 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/Patch.cpp')
-rw-r--r--src/libs/engine/Patch.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/libs/engine/Patch.cpp b/src/libs/engine/Patch.cpp
index 78184a82..09c638e9 100644
--- a/src/libs/engine/Patch.cpp
+++ b/src/libs/engine/Patch.cpp
@@ -119,26 +119,22 @@ Patch::process(SampleCount nframes, FrameTime start, FrameTime end)
return;
/* Prepare input ports */
+ /* FIXME: Pre-processing input ports breaks MIDI somehow? */
+ if (_ports)
+ for (size_t i=0; i < _ports->size(); ++i)
+ if (_ports->at(i)->is_output())
+ _ports->at(i)->pre_process(nframes, start, end);
- // FIXME: This breaks MIDI input, somehow? OK disabled?
- //for (Raul::List<Port*>::iterator i = _input_ports.begin(); i != _input_ports.end(); ++i)
- // (*i)->pre_process(nframes, start, end);
- for (Raul::List<Port*>::iterator i = _output_ports.begin(); i != _output_ports.end(); ++i)
- (*i)->pre_process(nframes, start, end);
-
-
+ /* Run */
if (_engine.process_slaves().size() > 0)
process_parallel(nframes, start, end);
else
process_single(nframes, start, end);
-
/* Write output ports */
-
- for (Raul::List<Port*>::iterator i = _input_ports.begin(); i != _input_ports.end(); ++i)
- (*i)->post_process(nframes, start, end);
- for (Raul::List<Port*>::iterator i = _output_ports.begin(); i != _output_ports.end(); ++i)
- (*i)->post_process(nframes, start, end);
+ if (_ports)
+ for (size_t i=0; i < _ports->size(); ++i)
+ _ports->at(i)->post_process(nframes, start, end);
}