#include <fst.h>
#endif
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace ARDOUR;
timeinfo->nanoSeconds = g_get_monotonic_time () * 1000;
- if (session) {
- framepos_t now = session->transport_frame();
+ if (plug && session) {
+ framepos_t now = plug->transport_frame();
timeinfo->samplePos = now;
timeinfo->sampleRate = session->frame_rate();
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);
newflags |= kVstTransportRecording;
}
- if (session->transport_speed () != 0.0f) {
+ if (plug->transport_speed () != 0.0f) {
newflags |= kVstTransportPlaying;
}
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;
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;
return 0;
}
-