summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-07 06:35:36 +0000
committerDavid Robillard <d@drobilla.net>2007-04-07 06:35:36 +0000
commit883f2e9f31914912f4c5e19bc9e463fe3663a638 (patch)
treee58ec7c219241468d4875cac08dfd67b61cb2a67 /src/libs/client
parent6178329ac029b44b7b9b4cfd7185b65aeb3269a9 (diff)
downloadingen-883f2e9f31914912f4c5e19bc9e463fe3663a638.tar.gz
ingen-883f2e9f31914912f4c5e19bc9e463fe3663a638.tar.bz2
ingen-883f2e9f31914912f4c5e19bc9e463fe3663a638.zip
Visual tweaks.
Loading range for LV2 plugins (client side). git-svn-id: http://svn.drobilla.net/lad/ingen@413 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/NodeModel.h2
-rw-r--r--src/libs/client/PluginModel.h25
2 files changed, 24 insertions, 3 deletions
diff --git a/src/libs/client/NodeModel.h b/src/libs/client/NodeModel.h
index 934261d8..2dd96f35 100644
--- a/src/libs/client/NodeModel.h
+++ b/src/libs/client/NodeModel.h
@@ -52,7 +52,7 @@ public:
const map<int, map<int, string> >& get_programs() const { return _banks; }
const string& plugin_uri() const { return _plugin_uri; }
- SharedPtr<PluginModel> plugin() const { return _plugin; }
+ SharedPtr<PluginModel> plugin() const { return _plugin; }
int num_ports() const { return _ports.size(); }
const PortModelList& ports() const { return _ports; }
virtual bool polyphonic() const { return _polyphonic; }
diff --git a/src/libs/client/PluginModel.h b/src/libs/client/PluginModel.h
index b9f784ed..4c769fdb 100644
--- a/src/libs/client/PluginModel.h
+++ b/src/libs/client/PluginModel.h
@@ -18,9 +18,13 @@
#ifndef PLUGINMODEL_H
#define PLUGINMODEL_H
+#include "../../config.h"
#include <string>
#include <iostream>
#include "raul/Path.h"
+#ifdef HAVE_SLV2
+#include <slv2/slv2.h>
+#endif
using std::string; using std::cerr; using std::endl;
namespace Ingen {
@@ -37,10 +41,19 @@ public:
enum Type { LV2, LADSPA, DSSI, Internal, Patch };
PluginModel(const string& uri, const string& type_uri, const string& name)
- : _uri(uri),
- _name(name)
+ : _uri(uri)
+ , _name(name)
{
set_type_from_uri(type_uri);
+#ifdef HAVE_SLV2
+ static SLV2Plugins plugins = NULL;
+ if (!plugins) {
+ plugins = slv2_plugins_new();
+ slv2_plugins_load_all(plugins);
+ }
+
+ _slv2_plugin = slv2_plugins_get_by_uri(plugins, uri.c_str());
+#endif
}
Type type() const { return _type; }
@@ -87,10 +100,18 @@ public:
string default_node_name() { return Raul::Path::nameify(_name); }
+#ifdef HAVE_SLV2
+ SLV2Plugin slv2_plugin() { return _slv2_plugin; }
+#endif
+
private:
Type _type;
string _uri;
string _name;
+
+#ifdef HAVE_SLV2
+ SLV2Plugin _slv2_plugin;
+#endif
};