summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/editor_tempodisplay.cc6
-rw-r--r--libs/ardour/tempo.cc6
2 files changed, 4 insertions, 8 deletions
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc
index 56ee463f9f..3f19665760 100644
--- a/gtk2_ardour/editor_tempodisplay.cc
+++ b/gtk2_ardour/editor_tempodisplay.cc
@@ -116,7 +116,6 @@ Editor::tempo_map_changed (const PropertyChange& /*ignored*/)
}
std::vector<TempoMap::BBTPoint> grid;
-
compute_current_bbt_points (grid, leftmost_frame, leftmost_frame + current_page_samples());
_session->tempo_map().apply_with_metrics (*this, &Editor::draw_metric_marks); // redraw metric markers
draw_measures (grid);
@@ -185,12 +184,9 @@ Editor::compute_current_bbt_points (std::vector<TempoMap::BBTPoint>& grid, frame
return;
}
- framecnt_t beat_before_lower_pos = _session->tempo_map().frame_at_beat (floor(_session->tempo_map().beat_at_frame (leftmost)));
- framecnt_t beat_after_upper_pos = _session->tempo_map().frame_at_beat (floor (_session->tempo_map().beat_at_frame (rightmost)) + 1.0);
-
/* prevent negative values of leftmost from creeping into tempomap
*/
- _session->tempo_map().get_grid (grid, max (beat_before_lower_pos, (framepos_t) 0), beat_after_upper_pos);
+ _session->tempo_map().get_grid (grid, max (leftmost, (framepos_t) 0), rightmost);
}
void
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc
index a8db57c36e..cdd279ae25 100644
--- a/libs/ardour/tempo.cc
+++ b/libs/ardour/tempo.cc
@@ -1454,10 +1454,10 @@ TempoMap::beat_at_pulse (const Metrics& metrics, const double& pulse) const
for (Metrics::const_iterator i = metrics.begin(); i != metrics.end(); ++i) {
MeterSection* m;
if ((m = dynamic_cast<MeterSection*> (*i)) != 0) {
- if (m->pulse() > pulse) {
- break;
- }
if (prev_ms) {
+ if (m->pulse() > pulse) {
+ break;
+ }
accumulated_beats += (m->pulse() - prev_ms->pulse()) * prev_ms->note_divisor();
}
prev_ms = m;