diff options
Diffstat (limited to 'libs/ardour/tempo.cc')
-rw-r--r-- | libs/ardour/tempo.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index 3170d588a1..bcbb01d9c9 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -1141,16 +1141,16 @@ TempoMap::round_to_type (nframes_t frame, int dir, BBTPointType type) case Bar: if (dir < 0) { /* relax */ - } else if (dir > 0) { if (bbt.beats > 0) { bbt.bars++; + } else if (metric.frame() < frame) { + bbt.bars++; } } else { if (bbt.beats > metric.meter().beats_per_bar()/2) { bbt.bars++; } - } bbt.beats = 1; bbt.ticks = 0; @@ -1162,6 +1162,8 @@ TempoMap::round_to_type (nframes_t frame, int dir, BBTPointType type) } else if (dir > 0) { if (bbt.ticks > 0) { bbt.beats++; + } else if (metric.frame() < frame) { + bbt.beats++; } } else { if (bbt.ticks >= (Meter::ticks_per_beat/2)) { @@ -1177,11 +1179,9 @@ TempoMap::round_to_type (nframes_t frame, int dir, BBTPointType type) } - /* - cerr << "for " << frame << " round to " << bbt << " using " - << metric.start() - << endl; - */ + cerr << "for " << frame << " round to " << bbt << " using " + << metric.start() + << endl; return metric.frame() + count_frames_between (metric.start(), bbt); } |