diff options
author | David Robillard <d@drobilla.net> | 2006-08-10 01:22:45 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-08-10 01:22:45 +0000 |
commit | ab6f1ed9bafa869648b6e94ee5186ff317b32c3e (patch) | |
tree | d61dba7f9b6f1ae755803afc4b79bcff06a36005 /libs/ardour/ardour/plugin.h | |
parent | 38c7d34d8c449c7ce5f7da9575c24e60c6b31b1a (diff) |
Merged with trunk R776
git-svn-id: svn://localhost/ardour2/branches/midi@777 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/plugin.h')
-rw-r--r-- | libs/ardour/ardour/plugin.h | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h index 86666c19af..6b11a975ca 100644 --- a/libs/ardour/ardour/plugin.h +++ b/libs/ardour/ardour/plugin.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2000 Paul Davis + Copyright (C) 2000-2006 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,8 +18,8 @@ $Id$ */ -#ifndef __ardour_ladspa_h__ -#define __ardour_ladspa_h__ +#ifndef __ardour_plugin_h__ +#define __ardour_plugin_h__ #include <boost/shared_ptr.hpp> #include <sigc++/signal.h> @@ -46,6 +46,9 @@ namespace ARDOUR { class AudioEngine; class Session; +class Plugin; +typedef boost::shared_ptr<Plugin> PluginPtr; + class PluginInfo { public: enum Type { @@ -54,11 +57,12 @@ class PluginInfo { VST }; - PluginInfo () { }; + PluginInfo () { } PluginInfo (const PluginInfo &o) : name(o.name), n_inputs(o.n_inputs), n_outputs(o.n_outputs), unique_id(o.unique_id), path (o.path), index(o.index) {} - ~PluginInfo () { }; + virtual ~PluginInfo () { } + string name; string category; uint32_t n_inputs; @@ -67,7 +71,9 @@ class PluginInfo { long unique_id; - private: + virtual PluginPtr load (Session& session) = 0; + + protected: friend class PluginManager; string path; uint32_t index; @@ -82,7 +88,7 @@ class Plugin : public Stateful, public sigc::trackable public: Plugin (ARDOUR::AudioEngine&, ARDOUR::Session&); Plugin (const Plugin&); - ~Plugin (); + virtual ~Plugin (); struct ParameterDescriptor { @@ -143,8 +149,8 @@ class Plugin : public Stateful, public sigc::trackable PBD::Controllable *get_nth_control (uint32_t); - PluginInfo & get_info() { return _info; } - void set_info (const PluginInfo &inf) { _info = inf; } + PluginInfoPtr get_info() { return _info; } + void set_info (const PluginInfoPtr inf) { _info = inf; } ARDOUR::AudioEngine& engine() const { return _engine; } ARDOUR::Session& session() const { return _session; } @@ -155,7 +161,7 @@ class Plugin : public Stateful, public sigc::trackable protected: ARDOUR::AudioEngine& _engine; ARDOUR::Session& _session; - PluginInfo _info; + PluginInfoPtr _info; uint32_t _cycles; map<string,string> presets; bool save_preset(string name, string domain /* vst, ladspa etc. */); @@ -181,9 +187,7 @@ class Plugin : public Stateful, public sigc::trackable vector<PortControllable*> controls; }; -/* this is actually defined in plugin_manager.cc */ - -boost::shared_ptr<Plugin> find_plugin(ARDOUR::Session&, string name, long unique_id, PluginInfo::Type); +PluginPtr find_plugin(ARDOUR::Session&, string name, long unique_id, PluginInfo::Type); } // namespace ARDOUR |