summaryrefslogtreecommitdiffstats
path: root/src/server/PatchImpl.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-12 06:09:44 +0000
committerDavid Robillard <d@drobilla.net>2012-05-12 06:09:44 +0000
commit1d9bb9768f8a7d0c76fa33688051cd8f2715075d (patch)
tree45aa6f6235fb6d2c4227081eeb7c938db255aab5 /src/server/PatchImpl.cpp
parenta53738e05b296b4ab4e0b701ea37d60013a42605 (diff)
downloadingen-1d9bb9768f8a7d0c76fa33688051cd8f2715075d.tar.gz
ingen-1d9bb9768f8a7d0c76fa33688051cd8f2715075d.tar.bz2
ingen-1d9bb9768f8a7d0c76fa33688051cd8f2715075d.zip
Use compiler checkable ProcessContext parameter rather than runtime context assertions.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4374 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/PatchImpl.cpp')
-rw-r--r--src/server/PatchImpl.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/server/PatchImpl.cpp b/src/server/PatchImpl.cpp
index 02b43d02..dd20fbf1 100644
--- a/src/server/PatchImpl.cpp
+++ b/src/server/PatchImpl.cpp
@@ -91,14 +91,12 @@ PatchImpl::deactivate()
}
void
-PatchImpl::disable()
+PatchImpl::disable(ProcessContext& context)
{
- ThreadManager::assert_thread(THREAD_PROCESS);
-
_process = false;
-
- for (Ports::iterator i = _outputs.begin(); i != _outputs.end(); ++i)
+ for (Ports::iterator i = _outputs.begin(); i != _outputs.end(); ++i) {
(*i)->clear_buffers();
+ }
}
bool
@@ -127,7 +125,7 @@ PatchImpl::apply_internal_poly(ProcessContext& context,
// TODO: Subpatch dynamic polyphony (i.e. changing port polyphony)
for (Nodes::iterator i = _nodes.begin(); i != _nodes.end(); ++i)
- (*i)->apply_poly(maid, poly);
+ (*i)->apply_poly(context, maid, poly);
for (Nodes::iterator i = _nodes.begin(); i != _nodes.end(); ++i) {
for (uint32_t j = 0; j < (*i)->num_ports(); ++j) {
@@ -216,7 +214,7 @@ PatchImpl::process_parallel(ProcessContext& context)
/* Signal dependants their input is ready */
for (uint32_t i = 0; i < n.dependants().size(); ++i)
- n.dependants()[i]->signal_input_ready();
+ n.dependants()[i]->signal_input_ready(context);
++num_finished;
} else {