From 46e5de590817756b21a7a5d99bd4963df343f455 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 20 Feb 2010 21:52:36 +0000 Subject: Heavy overhaul of buffer management and polyphony. * Working polyphony when nodes are instantiated at desired polyphony level (dynamic still doesn't work) * Use shared silent buffer for disconnected audio inputs (save memory) * Eliminate redundant patch compiling on delete and disconnect-all events that have child events * Fix a ton of crash bugs and other issues I've since forgotten git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2468 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/events/Delete.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/engine/events/Delete.cpp') diff --git a/src/engine/events/Delete.cpp b/src/engine/events/Delete.cpp index 27f1b995..31e249f5 100644 --- a/src/engine/events/Delete.cpp +++ b/src/engine/events/Delete.cpp @@ -132,16 +132,15 @@ Delete::execute(ProcessContext& context) { QueuedEvent::execute(context); + PatchImpl* parent_patch = NULL; + if (_patch_node_listnode) { assert(_node); if (_disconnect_event) _disconnect_event->execute(context); - if (_node->parent_patch()->compiled_patch()) - _engine.maid()->push(_node->parent_patch()->compiled_patch()); - - _node->parent_patch()->compiled_patch(_compiled_patch); + parent_patch = _node->parent_patch(); } else if (_patch_port_listnode) { assert(_port); @@ -149,14 +148,9 @@ Delete::execute(ProcessContext& context) if (_disconnect_event) _disconnect_event->execute(context); - if (_port->parent_patch()->compiled_patch()) - _engine.maid()->push(_port->parent_patch()->compiled_patch()); - - _port->parent_patch()->compiled_patch(_compiled_patch); - - if (_port->parent_patch()->external_ports()) - _engine.maid()->push(_port->parent_patch()->external_ports()); + parent_patch = _port->parent_patch(); + _engine.maid()->push(_port->parent_patch()->external_ports()); _port->parent_patch()->external_ports(_ports_array); if ( ! _port->parent_patch()->parent()) { @@ -164,6 +158,11 @@ Delete::execute(ProcessContext& context) } } + if (parent_patch) { + _engine.maid()->push(parent_patch->compiled_patch()); + parent_patch->compiled_patch(_compiled_patch); + } + _request->unblock(); } @@ -174,7 +173,8 @@ Delete::post_process() _removed_bindings.reset(); if (_path.is_root() || _path == "path:/control_in" || _path == "path:/control_out") { - _request->respond_error(_path.chop_scheme() + " can not be deleted"); + // XXX: Just ignore? + //_request->respond_error(_path.chop_scheme() + " can not be deleted"); } else if (!_node && !_port) { string msg = string("Could not find object ") + _path.chop_scheme() + " to delete"; _request->respond_error(msg); -- cgit v1.2.1