Experimental patch to ensure playback buffer bounds use minimal beat->frame rounding.
[ardour.git] / libs / ardour / midi_clock_slave.cc
index c7acb1b58c7df98ff8de4ffb643a65ddfc926ae7..9743327ec6146c7331435dafe333016385e7c57d 100644 (file)
@@ -82,7 +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);
+       const Tempo& current_tempo = session->tempo_map().tempo_at_frame (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();