From 883f2e9f31914912f4c5e19bc9e463fe3663a638 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 7 Apr 2007 06:35:36 +0000 Subject: Visual tweaks. Loading range for LV2 plugins (client side). git-svn-id: http://svn.drobilla.net/lad/ingen@413 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/PluginModel.h | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'src/libs/client/PluginModel.h') 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 #include #include "raul/Path.h" +#ifdef HAVE_SLV2 +#include +#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 }; -- cgit v1.2.1