From f404407f910b52c0fa0826f84fd90f96f0ef74a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Mon, 14 Oct 2024 14:04:03 -0400 Subject: [PATCH] [quantification] Make sure that quantified time never falls on the frame == buffer_size --- src/ossia/editor/scenario/time_interval.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ossia/editor/scenario/time_interval.cpp b/src/ossia/editor/scenario/time_interval.cpp index 891e996cfce..d2a7701eeaf 100644 --- a/src/ossia/editor/scenario/time_interval.cpp +++ b/src/ossia/editor/scenario/time_interval.cpp @@ -131,9 +131,9 @@ void time_interval::tick_impl( m_musical_start_position = num_quarters; } - if(new_date.impl > old_date.impl) + if(new_date.impl - 1 > old_date.impl) { - auto d = new_date; + auto d = ossia::time_value(new_date.impl - 1); const double num_quarters = d.impl / m_quarter_duration; auto [time, sig] = *ossia::last_before(m_timeSignature, d);