summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/plugin.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-06-11 22:59:35 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-06-11 22:59:35 +0000
commitd97312d438a813985916dd35f613510e9448441f (patch)
tree5be2844fc16359c2eb550b72c9f84737c534d614 /libs/ardour/ardour/plugin.h
parentc81691741118ab34c5f6f458c2d84f431e481ada (diff)
lots more work trying to create a common structure for accessing plugin and MIDNAME patch/preset/program names. still not done
git-svn-id: svn://localhost/ardour2/branches/3.0@12665 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/plugin.h')
-rw-r--r--libs/ardour/ardour/plugin.h30
1 files changed, 20 insertions, 10 deletions
diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h
index cfdf0e8121..f33fb9d1e5 100644
--- a/libs/ardour/ardour/plugin.h
+++ b/libs/ardour/ardour/plugin.h
@@ -166,16 +166,17 @@ class Plugin : public PBD::StatefulDestructible, public Latent
void monitoring_changed ();
struct PresetRecord {
- PresetRecord () : user (true) {}
- PresetRecord (const std::string& u, const std::string& l, bool s = true) : uri (u), label (l), user (s) {}
-
- bool operator!= (PresetRecord const & a) const {
- return uri != a.uri || label != a.label;
- }
-
- std::string uri;
- std::string label;
- bool user;
+ PresetRecord () : number (-1), user (true) {}
+ PresetRecord (const std::string& u, const std::string& l, int n = -1, bool s = true) : uri (u), label (l), number (n), user (s) {}
+
+ bool operator!= (PresetRecord const & a) const {
+ return number != a.number || uri != a.uri || label != a.label;
+ }
+
+ std::string uri;
+ std::string label;
+ int number; // if <0, invalid
+ bool user;
};
PresetRecord save_preset (std::string);
@@ -188,6 +189,15 @@ class Plugin : public PBD::StatefulDestructible, public Latent
std::vector<PresetRecord> get_presets ();
+ /* This is hard to return a correct value for because most plugin APIs
+ do not specify plugin behaviour. However, if you want to force
+ the display of plugin built-in preset names rather than MIDI program
+ numbers, return true. If you want a generic description, return
+ false.
+ */
+ virtual bool presets_are_MIDI_programs() const { return true; }
+ virtual bool current_preset_uses_general_midi() const { return true; }
+
/** @return Last preset to be requested; the settings may have
* been changed since; find out with parameter_changed_since_last_preset.
*/