diff options
author | Robin Gareus <robin@gareus.org> | 2016-01-09 15:22:16 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-01-09 15:22:16 +0100 |
commit | e6e7377cd8596f8ed8b5d39634e550a05995999b (patch) | |
tree | 88351b0e9b0325e446805be31156899d48985a2e /libs/ardour/audio_unit.cc | |
parent | 3710a977fc396bfd279634b7fd7329a5eeeda028 (diff) |
API evolution
The Session-reference is only needed to instantiate/load the plugin.
Indexing presets is not supposed to call load() and be const WRT to
PluginInfo
Diffstat (limited to 'libs/ardour/audio_unit.cc')
-rw-r--r-- | libs/ardour/audio_unit.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index 88bd981560..1c482736b8 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -2384,7 +2384,7 @@ AUPluginInfo::load (Session& session) } std::vector<Plugin::PresetRecord> -AUPluginInfo::get_presets(Session& session) +AUPluginInfo::get_presets (bool user_only) const { std::vector<Plugin::PresetRecord> p; boost::shared_ptr<CAComponent> comp; @@ -2422,7 +2422,10 @@ AUPluginInfo::get_presets(Session& session) } } -#if 0 // don't include factory presets in the sidebar, for now + if (user_only) { + return p; + } + // factory presets CFArrayRef presets; @@ -2455,7 +2458,6 @@ AUPluginInfo::get_presets(Session& session) } CFRelease (presets); unit->Uninitialize (); -#endif // factory presets #endif // NO_PLUGIN_STATE return p; |