From 82447431f4089c03847452c6ec9f9bc030868ac9 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 24 Apr 2023 20:58:07 +0200 Subject: [PATCH] VST3: properly debug ParamTitlesChanged --- libs/ardour/vst3_plugin.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libs/ardour/vst3_plugin.cc b/libs/ardour/vst3_plugin.cc index f1dae78d02..cc1958b771 100644 --- a/libs/ardour/vst3_plugin.cc +++ b/libs/ardour/vst3_plugin.cc @@ -1562,23 +1562,18 @@ VST3PI::restartComponent (int32 flags) for (int32 i = 0; i < n_params; ++i) { Vst::ParameterInfo pi; if (_controller->getParameterInfo (i, pi) != kResultTrue) { -#ifndef NDEBUG - printf ("Vst::kParamTitlesChanged: getParameterInfo (%d) failed\n", i); -#endif continue; } std::map::const_iterator idx = _ctrl_id_index.find (pi.id); if (idx != _ctrl_id_index.end ()) { Param& p (_ctrl_params[idx->second]); #ifndef NDEBUG - printf ("Vst::kParamTitlesChanged: update label (%d) '%s' -> '%s'\n", i, p.label.c_str(), tchar_to_utf8 (pi.title).c_str ()); + if (DEBUG_ENABLED (DEBUG::VST3Config) && p.label != tchar_to_utf8 (pi.title)) { + DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3 ParamTitlesChanged: '%1' -> '%2'\n", p.label, tchar_to_utf8 (pi.title))); + } #endif p.label = tchar_to_utf8 (pi.title).c_str (); p.normal = pi.defaultNormalizedValue; - } else { -#ifndef NDEBUG - printf ("Vst::kParamTitlesChanged: no Ctrl for (%d)\n", i); -#endif } } // TODO notify GUI: