summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events/CreateNodeEvent.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-22 03:48:28 +0000
committerDavid Robillard <d@drobilla.net>2007-10-22 03:48:28 +0000
commite9d99340c9ac29aaa7912db0554a88820c4a776a (patch)
tree2bb49de8b90d861330e8db50919a8137b10cc913 /src/libs/engine/events/CreateNodeEvent.cpp
parent5ae4d4d5e805e828b51b98767ac51da24c3b21f1 (diff)
downloadingen-e9d99340c9ac29aaa7912db0554a88820c4a776a.tar.gz
ingen-e9d99340c9ac29aaa7912db0554a88820c4a776a.tar.bz2
ingen-e9d99340c9ac29aaa7912db0554a88820c4a776a.zip
Rework plugin design (engine side) to be less crap.
Use LADSPA labels instead of munged friendly names to generate OSC paths. Separate OSC paths/names from human friendly names (conceptually, still needs UI exposing). git-svn-id: http://svn.drobilla.net/lad/ingen@898 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events/CreateNodeEvent.cpp')
-rw-r--r--src/libs/engine/events/CreateNodeEvent.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libs/engine/events/CreateNodeEvent.cpp b/src/libs/engine/events/CreateNodeEvent.cpp
index dea1024b..ab9c6eaf 100644
--- a/src/libs/engine/events/CreateNodeEvent.cpp
+++ b/src/libs/engine/events/CreateNodeEvent.cpp
@@ -18,6 +18,7 @@
#include <raul/Maid.hpp>
#include <raul/Path.hpp>
#include <raul/Path.hpp>
+#include "module/World.hpp"
#include "CreateNodeEvent.hpp"
#include "Responder.hpp"
#include "PatchImpl.hpp"
@@ -29,16 +30,17 @@
#include "ClientBroadcaster.hpp"
#include "ObjectStore.hpp"
#include "PortImpl.hpp"
+#include "AudioDriver.hpp"
namespace Ingen {
CreateNodeEvent::CreateNodeEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path,
- const string& plugin_uri, bool poly)
+ const string& plugin_uri, bool polyphonic)
: QueuedEvent(engine, responder, timestamp),
_path(path),
_plugin_uri(plugin_uri),
- _poly(poly),
+ _polyphonic(polyphonic),
_patch(NULL),
_node(NULL),
_compiled_patch(NULL),
@@ -52,13 +54,13 @@ CreateNodeEvent::CreateNodeEvent(Engine& engine, SharedPtr<Responder> responder,
* Do not use.
*/
CreateNodeEvent::CreateNodeEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path,
- const string& plugin_type, const string& plugin_lib, const string& plugin_label, bool poly)
+ const string& plugin_type, const string& plugin_lib, const string& plugin_label, bool polyphonic)
: QueuedEvent(engine, responder, timestamp),
_path(path),
_plugin_type(plugin_type),
_plugin_lib(plugin_lib),
_plugin_label(plugin_label),
- _poly(poly),
+ _polyphonic(polyphonic),
_patch(NULL),
_node(NULL),
_compiled_patch(NULL),
@@ -84,7 +86,10 @@ CreateNodeEvent::pre_process()
if (_patch && plugin) {
- _node = _engine.node_factory()->load_plugin(plugin, _path.name(), _poly, _patch);
+ Glib::Mutex::Lock lock(_engine.world()->rdf_world->mutex());
+
+ _node = plugin->instantiate(_path.name(), _polyphonic, _patch,
+ _engine.audio_driver()->sample_rate(), _engine.audio_driver()->buffer_size());
if (_node != NULL) {
_node->activate();