From 63396189845ad723ef7967fd8a05c85de4e41849 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 30 Jan 2021 00:45:45 +0100 Subject: [PATCH] Fix response logging filtering with bus info cache The response logging wasn't getting filtered. --- .../bridges/vst3-impls/plugin-proxy.cpp | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/plugin/bridges/vst3-impls/plugin-proxy.cpp b/src/plugin/bridges/vst3-impls/plugin-proxy.cpp index a4ee2059..373edb58 100644 --- a/src/plugin/bridges/vst3-impls/plugin-proxy.cpp +++ b/src/plugin/bridges/vst3-impls/plugin-proxy.cpp @@ -221,9 +221,11 @@ Vst3PluginProxyImpl::getBusCount(Steinberg::Vst::MediaType type, if (processing_bus_cache) { if (auto it = processing_bus_cache->bus_count.find(args); it != processing_bus_cache->bus_count.end()) { - bridge.logger.log_request(true, request); - // TODO: Add to the log message that this information was cached - bridge.logger.log_response(true, PrimitiveWrapper(it->second)); + const bool log_response = bridge.logger.log_request(true, request); + if (log_response) { + // TODO: Add to the log message that this information was cached + bridge.logger.log_response(true, PrimitiveWrapper(it->second)); + } return it->second; } @@ -256,11 +258,13 @@ Vst3PluginProxyImpl::getBusInfo(Steinberg::Vst::MediaType type, if (processing_bus_cache) { if (auto it = processing_bus_cache->bus_info.find(args); it != processing_bus_cache->bus_info.end()) { - bridge.logger.log_request(true, request); - // TODO: Add to the log message that this information was cached - bridge.logger.log_response( - true, GetBusInfoResponse{.result = Steinberg::kResultOk, - .updated_bus = it->second}); + const bool log_response = bridge.logger.log_request(true, request); + if (log_response) { + // TODO: Add to the log message that this information was cached + bridge.logger.log_response( + true, GetBusInfoResponse{.result = Steinberg::kResultOk, + .updated_bus = it->second}); + } bus = it->second;