summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/PatchImpl.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-05-20 05:21:43 +0000
committerDavid Robillard <d@drobilla.net>2008-05-20 05:21:43 +0000
commit34093b89423e7d195972e68676c73853228d35f6 (patch)
treeefaad4b4a3dd095f52cc90fd2af7db6c0dc33c40 /src/libs/engine/PatchImpl.cpp
parent240f6f0c4e6f5d2770fd166f162df41906e2e230 (diff)
downloadingen-34093b89423e7d195972e68676c73853228d35f6.tar.gz
ingen-34093b89423e7d195972e68676c73853228d35f6.tar.bz2
ingen-34093b89423e7d195972e68676c73853228d35f6.zip
Fix direct midi in -> midi out connections in root patch with plugins present.
Fix Jack MIDI output. Attempted fixes for LV2 UI MIDI event writing, but.. still not working? git-svn-id: http://svn.drobilla.net/lad/ingen@1223 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/PatchImpl.cpp')
-rw-r--r--src/libs/engine/PatchImpl.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/libs/engine/PatchImpl.cpp b/src/libs/engine/PatchImpl.cpp
index dba3d747..1625d1c3 100644
--- a/src/libs/engine/PatchImpl.cpp
+++ b/src/libs/engine/PatchImpl.cpp
@@ -34,12 +34,12 @@ namespace Ingen {
PatchImpl::PatchImpl(Engine& engine, const string& path, uint32_t poly, PatchImpl* parent, SampleRate srate, size_t buffer_size, uint32_t internal_poly)
-: NodeBase(new PatchPlugin("http://example.org/FIXME", "patch", "Ingen Patch"),
- path, poly, parent, srate, buffer_size),
- _engine(engine),
- _internal_poly(internal_poly),
- _compiled_patch(NULL),
- _process(false)
+ : NodeBase(new PatchPlugin("http://example.org/FIXME", "patch", "Ingen Patch"),
+ path, poly, parent, srate, buffer_size)
+ , _engine(engine)
+ , _internal_poly(internal_poly)
+ , _compiled_patch(NULL)
+ , _process(false)
{
assert(internal_poly >= 1);
}
@@ -139,7 +139,7 @@ PatchImpl::apply_internal_poly(Raul::Maid& maid, uint32_t poly)
void
PatchImpl::process(ProcessContext& context)
{
- if (_compiled_patch == NULL || _compiled_patch->size() == 0 || !_process)
+ if (!_process)
return;
NodeBase::pre_process(context);
@@ -152,10 +152,12 @@ PatchImpl::process(ProcessContext& context)
<< ((MidiBuffer*)_ports->at(i)->buffer(0))->event_count() << endl;*/
/* Run */
- if (_engine.process_slaves().size() > 0)
- process_parallel(context);
- else
- process_single(context);
+ if (_compiled_patch && _compiled_patch->size() > 0) {
+ if (_engine.process_slaves().size() > 0)
+ process_parallel(context);
+ else
+ process_single(context);
+ }
NodeBase::post_process(context);
}