From af2474ab80e53e9ebd6ee115126fabfa0a53e6e2 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 28 Dec 2020 10:04:56 -0700 Subject: [PATCH] fix setting VST loop times (in beats) --- libs/ardour/session_vst.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/ardour/session_vst.cc b/libs/ardour/session_vst.cc index a3214b4bd6..c8791910d2 100644 --- a/libs/ardour/session_vst.cc +++ b/libs/ardour/session_vst.cc @@ -270,10 +270,10 @@ intptr_t Session::vst_callback ( newflags |= kVstTransportCycleActive; Location * looploc = session->locations ()->auto_loop_location (); if (looploc) try { -#warning NUTEMPO need better conversion to double from Beats here - timeinfo->cycleStartPos = 0; // tmap->quarters_at (looploc->start ()); -#warning NUTEMPO need better conversion to double from Beats here - timeinfo->cycleEndPos = 0; // tmap->quarters_at (looploc->end ()); + const DoubleableBeats sdb (looploc->start().beats()); + const DoubleableBeats edb (looploc->end().beats()); + timeinfo->cycleStartPos = sdb.to_double(); + timeinfo->cycleEndPos = edb.to_double(); newflags |= kVstCyclePosValid; } catch (...) { } }