summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/NodeFactory.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-06-18 19:26:53 +0000
committerDavid Robillard <d@drobilla.net>2006-06-18 19:26:53 +0000
commit36f1e2ea3d2c7d20d8fa267a3a66438044e99e8e (patch)
tree963d5a6d87204fda9d8b1cd91f8810a6582bb41f /src/libs/engine/NodeFactory.cpp
parent00c8938a79d9e24547420d2a39421bcb7d8cc165 (diff)
downloadingen-36f1e2ea3d2c7d20d8fa267a3a66438044e99e8e.tar.gz
ingen-36f1e2ea3d2c7d20d8fa267a3a66438044e99e8e.tar.bz2
ingen-36f1e2ea3d2c7d20d8fa267a3a66438044e99e8e.zip
Reworked use of Plugin class in engine slightly (more RAII-ey)
git-svn-id: http://svn.drobilla.net/lad/grauph@56 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/NodeFactory.cpp')
-rw-r--r--src/libs/engine/NodeFactory.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/libs/engine/NodeFactory.cpp b/src/libs/engine/NodeFactory.cpp
index 9e7128b6..a26744d2 100644
--- a/src/libs/engine/NodeFactory.cpp
+++ b/src/libs/engine/NodeFactory.cpp
@@ -41,14 +41,14 @@
#include "Om.h"
#include "OmApp.h"
#ifdef HAVE_SLV2
-#include "LV2Plugin.h"
+#include "LV2Node.h"
#include <slv2/slv2.h>
#endif
#ifdef HAVE_LADSPA
-#include "LADSPAPlugin.h"
+#include "LADSPANode.h"
#endif
#ifdef HAVE_DSSI
-#include "DSSIPlugin.h"
+#include "DSSINode.h"
#endif
using std::string;
@@ -352,14 +352,13 @@ NodeFactory::load_lv2_plugin(const string& plug_uri,
Node* n = NULL;
if (plugin) {
- n = new Om::LV2Plugin(node_name, poly, parent, plugin->slv2_plugin(),
+ n = new Om::LV2Node(plugin, node_name, poly, parent,
om->audio_driver()->sample_rate(), om->audio_driver()->buffer_size());
- bool success = ((LV2Plugin*)n)->instantiate();
+ bool success = ((LV2Node*)n)->instantiate();
if (!success) {
delete n;
n = NULL;
}
- n->plugin(plugin);
}
return n;
@@ -528,15 +527,13 @@ NodeFactory::load_dssi_plugin(const string& uri,
return NULL;
}
- n = new DSSIPlugin(name, poly, parent, descriptor,
+ n = new DSSINode(plugin, name, poly, parent, descriptor,
om->audio_driver()->sample_rate(), om->audio_driver()->buffer_size());
- bool success = ((DSSIPlugin*)n)->instantiate();
+ bool success = ((DSSINode*)n)->instantiate();
if (!success) {
delete n;
n = NULL;
}
-
- n->plugin(plugin);
return n;
}
@@ -693,16 +690,14 @@ NodeFactory::load_ladspa_plugin(const string& uri,
return NULL;
}
- n = new LADSPAPlugin(name, poly, parent, descriptor,
+ n = new LADSPANode(plugin, name, poly, parent, descriptor,
om->audio_driver()->sample_rate(), om->audio_driver()->buffer_size());
- bool success = ((LADSPAPlugin*)n)->instantiate();
+ bool success = ((LADSPANode*)n)->instantiate();
if (!success) {
delete n;
n = NULL;
}
- n->plugin(plugin);
-
return n;
}