summaryrefslogtreecommitdiffstats
path: root/src/server/PatchImpl.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-23 00:57:57 +0000
committerDavid Robillard <d@drobilla.net>2012-05-23 00:57:57 +0000
commit7ca44cb8800a2800e58fadd0267416224650e08d (patch)
tree10a5a313b1fbf0fdbd9f16cd4ed1d4b8ed89fa74 /src/server/PatchImpl.cpp
parent2777835076e1ee319eaeee0a0b0acaad70931ac5 (diff)
downloadingen-7ca44cb8800a2800e58fadd0267416224650e08d.tar.gz
ingen-7ca44cb8800a2800e58fadd0267416224650e08d.tar.bz2
ingen-7ca44cb8800a2800e58fadd0267416224650e08d.zip
Fix crash when loading polyphonic patches.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4442 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/PatchImpl.cpp')
-rw-r--r--src/server/PatchImpl.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/PatchImpl.cpp b/src/server/PatchImpl.cpp
index 43a8ea01..bd12f78a 100644
--- a/src/server/PatchImpl.cpp
+++ b/src/server/PatchImpl.cpp
@@ -49,7 +49,8 @@ PatchImpl::PatchImpl(Engine& engine,
"patch", "Ingen Patch"),
symbol, poly, parent, srate)
, _engine(engine)
- , _internal_poly(internal_poly)
+ , _poly_pre(internal_poly)
+ , _poly_process(internal_poly)
, _compiled_patch(NULL)
, _process(false)
{
@@ -109,6 +110,7 @@ PatchImpl::prepare_internal_poly(BufferFactory& bufs, uint32_t poly)
for (Nodes::iterator i = _nodes.begin(); i != _nodes.end(); ++i)
(*i)->prepare_poly(bufs, poly);
+ _poly_pre = poly;
return true;
}
@@ -132,12 +134,11 @@ PatchImpl::apply_internal_poly(ProcessContext& context,
}
}
- const bool polyphonic = parent_patch() && (poly == parent_patch()->internal_poly());
+ const bool polyphonic = parent_patch() && (poly == parent_patch()->internal_poly_process());
for (Ports::iterator i = _outputs.begin(); i != _outputs.end(); ++i)
(*i)->setup_buffers(context, bufs, polyphonic ? poly : 1);
- _internal_poly = poly;
-
+ _poly_process = poly;
return true;
}
@@ -267,7 +268,6 @@ PatchImpl::add_node(Nodes::Node* ln)
assert(ln != NULL);
assert(ln->elem() != NULL);
assert(ln->elem()->parent_patch() == this);
- //assert(ln->elem()->polyphony() == _internal_poly);
_nodes.push_back(ln);
}