From ff51e315e33242fa9eb03a08457a7ec935aa78d4 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 17 Nov 2020 14:54:31 +0100 Subject: [PATCH] VST3: fix kMaxSendLevel, on Mixbus 15dB gain can be added --- libs/ardour/vst3_plugin.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/ardour/vst3_plugin.cc b/libs/ardour/vst3_plugin.cc index 31108da36f..55eef95bda 100644 --- a/libs/ardour/vst3_plugin.cc +++ b/libs/ardour/vst3_plugin.cc @@ -2632,8 +2632,13 @@ VST3PI::getContextInfoValue (double& value, FIDString id) return kNotInitialized; } if (0 == strcmp (id, ContextInfo::kMaxVolume)) { - value = 2.0; // Config->get_max_gain(); + value = s->gain_control ()->upper (); } else if (0 == strcmp (id, ContextInfo::kMaxSendLevel)) { +#ifdef MIXBUS + if (s->send_level_controllable (0)) { + value = s->send_level_controllable (0)->upper (); // pow (10.0, .05 * 15.0); + } +#endif value = 2.0; // Config->get_max_gain(); } else if (0 == strcmp (id, ContextInfo::kVolume)) { boost::shared_ptr ac = s->gain_control ();