diff options
author | Robin Gareus <robin@gareus.org> | 2018-10-22 15:43:46 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2018-10-22 15:46:59 +0200 |
commit | 4e1464e70fc73b4b962c0cad02e301832b9901f6 (patch) | |
tree | 36414b914bf33cfd7742e6b6faacff2cb9447103 /libs/ardour/vst_plugin.cc | |
parent | 947f6c78b2780a5b41e67d29472cde45c7eabdea (diff) |
Sort VST factory presets
This is more of a workaround than a fix. Simply by forcing the
URI to be sortable (VST-user presets are sorted at the end).
This eventually needs a deeper cleanup and API consolidation
PluginInfo::get_presets(bool) returns an ordered std::vector.
However this API is only used in a few cases where the plugin is
not instantiated. PluginInfo::get_presets(bool).
The problem is Plugin::get_presets(). The method returns
information that was previously cached by Plugin::find_presets() in
std::map<URI, ...>
Diffstat (limited to 'libs/ardour/vst_plugin.cc')
-rw-r--r-- | libs/ardour/vst_plugin.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc index 6a29d9d5df..a85c9ca678 100644 --- a/libs/ardour/vst_plugin.cc +++ b/libs/ardour/vst_plugin.cc @@ -840,7 +840,8 @@ VSTPlugin::find_presets () int const vst_version = _plugin->dispatcher (_plugin, effGetVstVersion, 0, 0, NULL, 0); for (int i = 0; i < _plugin->numPrograms; ++i) { - PresetRecord r (string_compose (X_("VST:%1:%2"), unique_id (), i), "", false); + + PresetRecord r (string_compose (X_("VST:%1:%2"), unique_id (), std::setw(4), std::setfill('0'), i), "", false); if (vst_version >= 2) { char buf[256]; |