summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/Patch.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-09-08 03:58:00 +0000
committerDavid Robillard <d@drobilla.net>2006-09-08 03:58:00 +0000
commit48f87f1f1649fb7e169fdaac2cd38370e8a4a1fa (patch)
tree9da4b4b075791ac1ec78b499dbcbec6101f54690 /src/libs/engine/Patch.cpp
parentacbe9a26ec3ab689e430225d15e95e73a7378aa9 (diff)
downloadingen-48f87f1f1649fb7e169fdaac2cd38370e8a4a1fa.tar.gz
ingen-48f87f1f1649fb7e169fdaac2cd38370e8a4a1fa.tar.bz2
ingen-48f87f1f1649fb7e169fdaac2cd38370e8a4a1fa.zip
De-singleton-ified Engine
Slight rework of Responder/ClientKey/ClientInterface for Requests git-svn-id: http://svn.drobilla.net/lad/ingen@119 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/Patch.cpp')
-rw-r--r--src/libs/engine/Patch.cpp35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/libs/engine/Patch.cpp b/src/libs/engine/Patch.cpp
index c8c3dd3a..257deb59 100644
--- a/src/libs/engine/Patch.cpp
+++ b/src/libs/engine/Patch.cpp
@@ -94,18 +94,17 @@ Patch::deactivate()
void
-Patch::process(bool p)
+Patch::disable()
{
- if (!p) {
- // Write output buffers to 0
- /*for (List<InternalNode*>::iterator i = _bridge_nodes.begin(); i != _bridge_nodes.end(); ++i) {
- assert((*i)->as_port() != NULL);
- if ((*i)->as_port()->port_info()->is_output())
- (*i)->as_port()->clear_buffers();*/
- for (List<Port*>::iterator i = _output_ports.begin(); i != _output_ports.end(); ++i)
- (*i)->clear_buffers();
- }
- _process = p;
+ // Write output buffers to 0
+ /*for (List<InternalNode*>::iterator i = _bridge_nodes.begin(); i != _bridge_nodes.end(); ++i) {
+ assert((*i)->as_port() != NULL);
+ if ((*i)->as_port()->port_info()->is_output())
+ (*i)->as_port()->clear_buffers();*/
+ for (List<Port*>::iterator i = _output_ports.begin(); i != _output_ports.end(); ++i)
+ (*i)->clear_buffers();
+
+ _process = false;
}
@@ -114,7 +113,7 @@ Patch::process(bool p)
* Calls all Nodes in the order _process_order specifies.
*/
void
-Patch::process(SampleCount nframes)
+Patch::process(SampleCount nframes, FrameTime start, FrameTime end)
{
if (_process_order == NULL || !_process)
return;
@@ -123,31 +122,31 @@ Patch::process(SampleCount nframes)
// Prepare input ports for nodes to consume
for (List<Port*>::iterator i = _input_ports.begin(); i != _input_ports.end(); ++i)
- (*i)->process(nframes);
+ (*i)->process(nframes, start, end);
// Run all nodes (consume input ports)
for (size_t i=0; i < _process_order->size(); ++i) {
// Could be a gap due to a node removal event (see RemoveNodeEvent.cpp)
// Yes, this is ugly
if (_process_order->at(i) != NULL)
- _process_order->at(i)->process(nframes);
+ _process_order->at(i)->process(nframes, start, end);
}
// Prepare output ports (for caller to consume)
for (List<Port*>::iterator i = _output_ports.begin(); i != _output_ports.end(); ++i)
- (*i)->process(nframes);
+ (*i)->process(nframes, start, end);
}
void
-Patch::add_to_store()
+Patch::add_to_store(ObjectStore* store)
{
// Add self and ports
- NodeBase::add_to_store();
+ NodeBase::add_to_store(store);
// Add nodes
for (List<Node*>::iterator j = _nodes.begin(); j != _nodes.end(); ++j)
- (*j)->add_to_store();
+ (*j)->add_to_store(store);
}