From 354f6a7d1cea3cafe743e7dd4d0115b0cc4295ba Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 28 Feb 2010 23:27:37 +0000 Subject: Just always allocate destination port buffers on connect, since being clever about it likes to crash so much. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2511 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/events/Connect.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/engine/events/Connect.cpp b/src/engine/events/Connect.cpp index abc093a5..124ada06 100644 --- a/src/engine/events/Connect.cpp +++ b/src/engine/events/Connect.cpp @@ -135,13 +135,13 @@ Connect::pre_process() _patch->add_connection(_connection); _dst_input_port->increment_num_connections(); - if ((_dst_input_port->num_connections() == 1 + /*if ((_dst_input_port->num_connections() == 1 && (_connection->must_mix() || _connection->must_queue())) - || _dst_input_port->num_connections() == 2) { + || _dst_input_port->num_connections() == 2) {*/ _buffers = new Raul::Array(_dst_input_port->poly()); _dst_input_port->get_buffers(*_engine.buffer_factory(), _buffers, _dst_input_port->poly()); - } + //} if (_patch->enabled()) _compiled_patch = _patch->compile(); @@ -158,10 +158,11 @@ Connect::execute(ProcessContext& context) if (_error == NO_ERROR) { // This must be inserted here, since they're actually used by the audio thread _dst_input_port->add_connection(_port_listnode); - if (_buffers) + assert(_buffers); + //if (_buffers) _engine.maid()->push(_dst_input_port->set_buffers(_buffers)); - else - _dst_input_port->setup_buffers(*_engine.buffer_factory(), _dst_input_port->poly()); + //else + // _dst_input_port->setup_buffers(*_engine.buffer_factory(), _dst_input_port->poly()); _dst_input_port->connect_buffers(); _engine.maid()->push(_patch->compiled_patch()); _patch->compiled_patch(_compiled_patch); -- cgit v1.2.1