change API for GainControl, VCA and VCAManager
[ardour.git] / libs / ardour / session_vst.cc
index 23cf0f8b001fa96edf9117907cf726ea2e720d91..3ee5d5889cdd1dec6c57055ed1be652b1c80acbc 100644 (file)
@@ -64,6 +64,7 @@ vst_ppq (const TempoMetric& tm, const Timecode::BBT_Time& bbt, double& ppqBar)
 
        ppqBar *= ppq_scaling;
        ppqBeat *= ppq_scaling;
+       ppqTick *= ppq_scaling;
 
        return ppqBar + ppqBeat + ppqTick;
 }
@@ -222,7 +223,8 @@ intptr_t Session::vst_callback (
                                Timecode::BBT_Time bbt;
 
                                try {
-                                       session->tempo_map().bbt_time_rt (now, bbt);
+                                       bbt = session->tempo_map().bbt_at_frame_rt (now);
+
                                        double ppqBar;
                                        double ppqPos = vst_ppq (tm, bbt, ppqBar);
 
@@ -289,10 +291,10 @@ intptr_t Session::vst_callback (
                                        double ppqBar;
                                        Timecode::BBT_Time bbt;
 
-                                       session->tempo_map().bbt_time_rt (looploc->start (), bbt);
+                                       bbt = session->tempo_map ().bbt_at_frame_rt (looploc->start ());
                                        timeinfo->cycleStartPos = vst_ppq (tm, bbt, ppqBar);
 
-                                       session->tempo_map().bbt_time_rt (looploc->end (), bbt);
+                                       bbt = session->tempo_map ().bbt_at_frame_rt (looploc->end ());
                                        timeinfo->cycleEndPos = vst_ppq (tm, bbt, ppqBar);
 
                                        newflags |= kVstCyclePosValid;
@@ -336,7 +338,7 @@ intptr_t Session::vst_callback (
                SHOW_CALLBACK ("audioMasterTempoAt");
                // returns tempo (in bpm * 10000) at sample frame location passed in <value>
                if (session) {
-                       const Tempo& t (session->tempo_map().tempo_at (value));
+                       const Tempo& t (session->tempo_map().tempo_at_frame (value));
                        return t.beats_per_minute() * 1000;
                } else {
                        return 0;
@@ -547,4 +549,3 @@ intptr_t Session::vst_callback (
 
        return 0;
 }
-