Fix off-by-one in body_range().
[ardour.git] / libs / ardour / midi_clock_slave.cc
index cc717d5fb4d1a158c09c08ece4f0e1a24f6bfa52..05c0e9e2ac866570b1396e46dc5a0526fe1cbc51 100644 (file)
 #include "pbd/error.h"
 #include "pbd/failed_constructor.h"
 #include "pbd/pthread_utils.h"
+#include "pbd/convert.h"
 
 #include "midi++/port.h"
 
 #include "ardour/debug.h"
 #include "ardour/slave.h"
-#include "ardour/session.h"
-#include "ardour/audioengine.h"
-#include "ardour/cycles.h"
 #include "ardour/tempo.h"
 
-
 #include "i18n.h"
 
 using namespace std;
@@ -86,10 +83,7 @@ void
 MIDIClock_Slave::calculate_one_ppqn_in_frames_at(framepos_t time)
 {
        const Tempo& current_tempo = session->tempo_map().tempo_at(time);
-       const Meter& current_meter = session->tempo_map().meter_at(time);
-       double frames_per_beat =
-               current_tempo.frames_per_beat(session->frame_rate(),
-                                             current_meter);
+       double frames_per_beat = current_tempo.frames_per_beat(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;