summaryrefslogtreecommitdiff
path: root/libs/ardour/tempo.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-02-17 22:41:34 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-02-17 22:41:34 +0000
commit15936ab6d9569838024a2d83145052d1e495b2ed (patch)
treec0ad3c4099a3fad330eb7925fd44a6cd129844a4 /libs/ardour/tempo.cc
parentdf8b8d7ba640096fb9a1e690601b8deeff118c30 (diff)
a boatload of changes and fixes related to SAE menu redesign (several new operations, things set up as actions for use in the main menu; fix Editor::snap_to() since it was really severely broken for general use
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3079 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/tempo.cc')
-rw-r--r--libs/ardour/tempo.cc14
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);
}