Cache VST3 parameter information

This is in some cases needed to get decent performance in REAPER, as
REAPER seems to query this information (which cannot change without the
plugin requesting a restart) four times per second.
This commit is contained in:
Robbert van der Helm
2021-01-30 22:24:05 +01:00
parent 8bba5d8773
commit b5dd806b2d
7 changed files with 181 additions and 46 deletions
+5 -1
View File
@@ -1411,13 +1411,17 @@ void Vst3Logger::log_response(
void Vst3Logger::log_response(
bool is_host_vst,
const YaEditController::GetParameterInfoResponse& response) {
const YaEditController::GetParameterInfoResponse& response,
bool from_cache) {
log_response_base(is_host_vst, [&](auto& message) {
message << response.result.string();
if (response.result == Steinberg::kResultOk) {
std::string param_title =
VST3::StringConvert::convert(response.updated_info.title);
message << ", <ParameterInfo for '" << param_title << "'>";
if (from_cache) {
message << " (from cache)";
}
}
});
}