From f0b42322393f6e67fe008c1d5b6866b7d5761d43 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Mon, 23 Nov 2020 16:38:46 +0100 Subject: [PATCH] Add more debug printing for audioMasterGetTime() --- CHANGELOG.md | 8 ++++++++ src/common/logging.cpp | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db253aeb..001ce820 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Changed + +- When `YABRIDGE_DEBUG_LEVEL` is set to 2 or higher and a plugin asks the host + for the current position in the song, yabridge will now print that position in + quarter notes and samples as part of the debug output. + ## [2.1.0] - 2020-11-20 ### Added diff --git a/src/common/logging.cpp b/src/common/logging.cpp index c65a82cc..ad08e913 100644 --- a/src/common/logging.cpp +++ b/src/common/logging.cpp @@ -290,7 +290,11 @@ void Logger::log_event_response( << ", r: " << rect.right << ", b: " << rect.bottom << "}"; }, - [&](const VstTimeInfo&) { message << ", "; }}, + [&](const VstTimeInfo& info) { + message << ", <" + << "quarter_notes = " << info.ppqPos + << ", samples = " << info.samplePos << ">"; + }}, payload); log(message.str());