From 46459ab2f46fdb826102562c266b0bc2921a3737 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 28 Sep 2008 04:55:46 +0000 Subject: Remove header namespace pollution (particularly from libs/gui/App.hpp). Fix more LV2 plugin RDF race/lock issues with -eg. Show human readable names on new ports when human readable is set (fix ticket #202). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1523 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/LV2Plugin.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/libs/engine/LV2Plugin.cpp') diff --git a/src/libs/engine/LV2Plugin.cpp b/src/libs/engine/LV2Plugin.cpp index 09d48a10..90a3a6b8 100644 --- a/src/libs/engine/LV2Plugin.cpp +++ b/src/libs/engine/LV2Plugin.cpp @@ -16,9 +16,13 @@ */ #include +#include +#include #include "LV2Plugin.hpp" #include "LV2Node.hpp" #include "NodeImpl.hpp" +#include "Engine.hpp" +#include "AudioDriver.hpp" namespace Ingen { @@ -58,11 +62,14 @@ NodeImpl* LV2Plugin::instantiate(const string& name, bool polyphonic, Ingen::PatchImpl* parent, - SampleRate srate, - size_t buffer_size) + Engine& engine) { + SampleCount srate = engine.audio_driver()->sample_rate(); + SampleCount buffer_size = engine.audio_driver()->buffer_size(); + load(); // FIXME: unload at some point + Glib::Mutex::Lock lock(engine.world()->rdf_world->mutex()); LV2Node* n = new LV2Node(this, name, polyphonic, parent, srate, buffer_size); if ( ! n->instantiate() ) { -- cgit v1.2.1