From e8e6c94ebe95d6d7fd48cea1c383d749272e7662 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 8 Aug 2012 00:15:43 +0000 Subject: Support latest LV2 buf-size extension. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4623 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/ingen_lv2.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/server/ingen_lv2.cpp') diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index ccbeb7d4..7da7f476 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -494,23 +494,28 @@ ingen_instantiate(const LV2_Descriptor* descriptor, } } + plugin->world = new Ingen::World( + plugin->argc, plugin->argv, plugin->map, unmap); + if (!plugin->world->load_module("serialisation")) { + delete plugin->world; + return NULL; + } + uint32_t block_length = 4096; + uint32_t seq_size = 0; if (access) { uint32_t min, multiple_of, power_of; access->get_sample_count( access->handle, &min, &block_length, &multiple_of, &power_of); + access->get_buf_size( + access->handle, &seq_size, + plugin->world->uris().atom_Sequence, block_length); Raul::info(Raul::fmt("Block length: %1% frames\n") % block_length); + Raul::info(Raul::fmt("Sequence size: %1% bytes\n") % seq_size); } else { Raul::warn("Warning: No buffer size access, guessing 4096 frames.\n"); } - plugin->world = new Ingen::World( - plugin->argc, plugin->argv, plugin->map, unmap); - if (!plugin->world->load_module("serialisation")) { - delete plugin->world; - return NULL; - } - SharedPtr engine(new Server::Engine(plugin->world)); plugin->world->set_engine(engine); -- cgit v1.2.1