From f3fbb96d6a2b49cd305d7ca3af5601352fa49104 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 22 Oct 2020 01:37:40 +0200 Subject: [PATCH] Fix VST3 PSL channel-index order While Ardour uses separate indices when naming tracks and busses ("track 1", "track 2", "bus 1", "bus 2"), the indices are contiguous (0: "track 1", 1: "track 2", 2: "bus 1", 3: "bus 2"). --- libs/ardour/vst3_plugin.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ardour/vst3_plugin.cc b/libs/ardour/vst3_plugin.cc index e55b57037f..45d7cb914c 100644 --- a/libs/ardour/vst3_plugin.cc +++ b/libs/ardour/vst3_plugin.cc @@ -2497,7 +2497,7 @@ VST3PI::getContextInfoValue (int32& value, FIDString id) return kNotInitialized; } if (0 == strcmp (id, ContextInfo::kIndexMode)) { - value = ContextInfo::kPerTypeIndex; + value = ContextInfo::kFlatIndex; } else if (0 == strcmp (id, ContextInfo::kType)) { if (s->is_master ()) { value = ContextInfo::kOut; @@ -2511,7 +2511,7 @@ VST3PI::getContextInfoValue (int32& value, FIDString id) } else if (0 == strcmp (id, ContextInfo::kMain)) { value = s->is_master() ? 1 : 0; } else if (0 == strcmp (id, ContextInfo::kIndex)) { - value = s->presentation_info ().order(); // XXX + value = s->presentation_info ().order(); } else if (0 == strcmp (id, ContextInfo::kColor)) { value = s->presentation_info ().color(); #if BYTEORDER == kBigEndian