From 641351d5254e816e3c9c0e99d486c3864cf67e10 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Tue, 28 Apr 2020 12:04:09 +0200 Subject: [PATCH] Also filter out the event with opcode 52 Not sure what this is, but it's called by Bitwig every time a buffer is being processed. --- README.md | 10 +++++----- src/common/logging.cpp | 4 ++-- src/common/logging.h | 5 +++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 5c3138df..cdb5cb82 100644 --- a/README.md +++ b/README.md @@ -149,12 +149,12 @@ variables: from the Wine process and some basic information such as the plugin being loaded and the wineprefix being used. - A value of `1` will log information about most events and function calls - being sent between the VST host and the plugin. This filters out the - `effEditIdle()` and `audioMasterGetTime()` calls since those are sent tens + being sent between the VST host and the plugin. This filters out some events + such as `effEditIdle()` and `audioMasterGetTime()` since those are sent tens of times per second by for every plugin. - - A value of `2` will cause all of the events to be logged, including - `effEditIdle()` and `audioMasterGettime()`. This can be very verbose but it - can be crucial for debugging plugin-specific problems. + - A value of `2` will cause all of the events to be logged, including the + events mentioned above. This can be very verbose but it can be crucial for + debugging plugin-specific problems. More detailed information about these levels can be found in `src/common/logging.h`. diff --git a/src/common/logging.cpp b/src/common/logging.cpp index 1821868a..2f20e90b 100644 --- a/src/common/logging.cpp +++ b/src/common/logging.cpp @@ -255,8 +255,8 @@ bool Logger::should_filter_event(bool is_dispatch, int opcode) { // 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 and filter that out as well - if ((is_dispatch && opcode == effEditIdle) || + // TODO: Figure out what opcode 52 is + if ((is_dispatch && (opcode == effEditIdle || opcode == 52)) || (!is_dispatch && opcode == audioMasterGetTime)) { return true; } diff --git a/src/common/logging.h b/src/common/logging.h index 52ee363c..2db44ee1 100644 --- a/src/common/logging.h +++ b/src/common/logging.h @@ -46,8 +46,9 @@ class Logger { /** * Also print information about callbacks and functions being called by * the plugin and the host. This excludes the `effEditIdle()` and - * `audioMasterGetTime()` events since those events are typically sent - * tens of times per second. Every message is prefixed with a timestamp. + * `audioMasterGetTime()` events and the event with opcode 52 since + * those events are typically sent tens of times per second. Every + * message is prefixed with a timestamp. */ most_events = 1, /**