X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fmidi_clock_slave.cc;h=edc6e91e32b44d38206e1e94ec155e799d00b3dc;hb=33e95a15778e7fe87c204b0c4f2db039f857b523;hp=c7acb1b58c7df98ff8de4ffb643a65ddfc926ae7;hpb=7898435d3f94355fa0996dc9f85b3bc1ef173585;p=ardour.git diff --git a/libs/ardour/midi_clock_slave.cc b/libs/ardour/midi_clock_slave.cc index c7acb1b58c..edc6e91e32 100644 --- a/libs/ardour/midi_clock_slave.cc +++ b/libs/ardour/midi_clock_slave.cc @@ -35,7 +35,7 @@ #include "ardour/slave.h" #include "ardour/tempo.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace std; using namespace ARDOUR; @@ -82,11 +82,7 @@ MIDIClock_Slave::rebind (MidiPort& port) void MIDIClock_Slave::calculate_one_ppqn_in_frames_at(framepos_t time) { - const Tempo& current_tempo = session->tempo_map().tempo_at(time); - double const frames_per_beat = session->tempo_map().frames_per_beat_at (time, session->frame_rate()); - - double quarter_notes_per_beat = 4.0 / current_tempo.note_type(); - double frames_per_quarter_note = frames_per_beat / quarter_notes_per_beat; + const double frames_per_quarter_note = session->tempo_map().frames_per_quarter_note_at (time, session->frame_rate()); one_ppqn_in_frames = frames_per_quarter_note / double (ppqn); // DEBUG_TRACE (DEBUG::MidiClock, string_compose ("at %1, one ppqn = %2\n", time, one_ppqn_in_frames));