diff options
author | David Robillard <d@drobilla.net> | 2009-02-14 03:28:12 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-02-14 03:28:12 +0000 |
commit | ef172d7ad6f4498c92c115bc1ffbfd156c677e4e (patch) | |
tree | 58f4be15cb27bac903b56335e3294a63728f8d72 /libs/ardour/ardour/plugin.h | |
parent | f609d97ccd7f773ddbfaf62dc45cef5e5fbb3aa8 (diff) |
Less weak plugin preset system (maybe AU preset stuff can use the 'normal' thing instead of being all weird now?).
LV2 preset support as implemented in svn calf plugins (experimental extension).
git-svn-id: svn://localhost/ardour2/branches/3.0@4547 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/plugin.h')
-rw-r--r-- | libs/ardour/ardour/plugin.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h index bb81776d53..68e94a9231 100644 --- a/libs/ardour/ardour/plugin.h +++ b/libs/ardour/ardour/plugin.h @@ -138,9 +138,19 @@ class Plugin : public PBD::StatefulDestructible, public Latent virtual bool parameter_is_input(uint32_t) const = 0; virtual bool parameter_is_output(uint32_t) const = 0; - virtual bool save_preset(string name) = 0; - virtual bool load_preset (const string preset_label); - virtual std::vector<std::string> get_presets(); + virtual bool save_preset(string uri) = 0; + virtual bool load_preset (const string uri); + + struct PresetRecord { + PresetRecord(const std::string& u, const std::string& l) : uri(u), label(l) {} + string uri; + string label; + }; + + virtual std::vector<PresetRecord> get_presets(); + + const PresetRecord* preset_by_label(const string& label); + const PresetRecord* preset_by_uri(const string& uri); virtual bool has_editor() const = 0; @@ -189,8 +199,8 @@ class Plugin : public PBD::StatefulDestructible, public Latent ARDOUR::Session& _session; PluginInfoPtr _info; uint32_t _cycles; - map<string,string> presets; - bool save_preset(string name, string domain /* vst, ladspa etc. */); + map<string,PresetRecord> presets; + bool save_preset(string uri, string domain /* vst, ladspa etc. */); }; PluginPtr find_plugin(ARDOUR::Session&, string unique_id, ARDOUR::PluginType); |