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/Engine.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/engine/Engine.cpp') diff --git a/src/engine/Engine.cpp b/src/engine/Engine.cpp index fe9bdd8c..dde8ec8b 100644 --- a/src/engine/Engine.cpp +++ b/src/engine/Engine.cpp @@ -166,6 +166,8 @@ Engine::activate() { assert(_driver); + _buffer_factory->set_block_length(_driver->block_length()); + _message_context->Thread::start(); uint32_t parallelism = _world->conf->option("parallelism").get_int32(); @@ -178,12 +180,11 @@ Engine::activate() // Create root patch PatchImpl* root_patch = _driver->root_patch(); if (!root_patch) { - root_patch = new PatchImpl(*this, "root", 1, NULL, - _driver->sample_rate(), _driver->buffer_size(), 1); + root_patch = new PatchImpl(*this, "root", 1, NULL, _driver->sample_rate(), 1); root_patch->meta().set_property(uris.rdf_type, uris.ingen_Patch); root_patch->meta().set_property(uris.ingen_polyphony, Raul::Atom(int32_t(1))); root_patch->set_property(uris.rdf_type, uris.ingen_Node); - root_patch->activate(); + root_patch->activate(*_buffer_factory); _world->store->add(root_patch); root_patch->compiled_patch(root_patch->compile()); _driver->set_root_patch(root_patch); -- cgit v1.2.1