From 0ef15fc911cc1a44ff05a6afc7ddf18239e86956 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 13 Feb 2021 17:34:51 +0100 Subject: [PATCH] Add human readable name for effGetTailSize opcode --- src/common/logging/vst2.cpp | 10 ++++++---- src/common/vst24.h | 6 ++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/common/logging/vst2.cpp b/src/common/logging/vst2.cpp index de43a961..8b89873b 100644 --- a/src/common/logging/vst2.cpp +++ b/src/common/logging/vst2.cpp @@ -154,7 +154,10 @@ std::optional opcode_to_string(bool is_dispatch, int opcode) { return "effSetSpeakerArrangement"; break; case effGetSpeakerArrangement: - return "effGetSpeakerArrangement "; + return "effGetSpeakerArrangement"; + break; + case effGetTailSize: + return "effGetTailSize"; break; default: return std::nullopt; @@ -521,9 +524,8 @@ bool Vst2Logger::should_filter_event(bool is_dispatch, int opcode) const { // Filter out log messages related to these events by default since they are // called tens of times per second - // TODO: Figure out what opcode 52 is - if ((is_dispatch && - (opcode == effEditIdle || opcode == 52 || opcode == effIdle)) || + if ((is_dispatch && (opcode == effEditIdle || opcode == effGetTailSize || + opcode == effIdle)) || (!is_dispatch && (opcode == audioMasterGetTime || opcode == audioMasterGetCurrentProcessLevel))) { return true; diff --git a/src/common/vst24.h b/src/common/vst24.h index fb6e39b2..8d9b0da3 100644 --- a/src/common/vst24.h +++ b/src/common/vst24.h @@ -47,6 +47,12 @@ [[maybe_unused]] constexpr int effSetSpeakerArrangement = 42; [[maybe_unused]] constexpr int effGetSpeakerArrangement = 69; +/** + * Used by hosts to query the length of reverb tails (equivalent to + * `IAudioProcessor::getTailSamples`). Found on the same list as above. + */ +[[maybe_unused]] constexpr int effGetTailSize = 52; + /** * The struct that's being passed through the data parameter during the * `effGetInputProperties` and `effGetOutputProperties` opcodes. Reverse