13
0

add a PluginPreset struct: combined plugin-info + preset-record

...in preparation to allow adding presets directly.
This commit is contained in:
Robin Gareus 2015-12-25 14:38:31 +01:00
parent 0b30814bdd
commit a8159326b8

View File

@ -325,6 +325,25 @@ private:
void resolve_midi ();
};
struct PluginPreset {
PluginInfoPtr _pip;
Plugin::PresetRecord _preset;
PluginPreset (PluginInfoPtr pip, const Plugin::PresetRecord *preset = NULL)
: _pip (pip)
{
if (preset) {
_preset.uri = preset->uri;
_preset.label = preset->label;
_preset.number = preset->number;
_preset.user = preset->user;
}
}
};
typedef boost::shared_ptr<PluginPreset> PluginPresetPtr;
typedef std::list<PluginPresetPtr> PluginPresetList;
PluginPtr find_plugin(ARDOUR::Session&, std::string unique_id, ARDOUR::PluginType);
} // namespace ARDOUR