13
0

fix setting VST loop times (in beats)

This commit is contained in:
Paul Davis 2020-12-28 10:04:56 -07:00
parent 06f93e65b2
commit af2474ab80

View File

@ -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 (...) { }
}