summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/tempo.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-01-04 02:49:01 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-01-04 02:49:01 +0000
commitb1a33855ce4254ebbee4f273bb74ceb50628ed05 (patch)
tree01dffa7f7b41545e45fe6cda8787cdac507a3edc /libs/ardour/ardour/tempo.h
parent10d9eaf0bd0f40d5bd272268dbac20908557ad71 (diff)
use BBTPoint::is_bar() rather than ::beat == 1 ; implement TempoMap::framepos_plus_{beats,bbt}() with new map structure (not totally finished or accurate yet); prevent crash when dragging a marker to replace the initial tempo/meter markers
git-svn-id: svn://localhost/ardour2/branches/3.0@11154 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/tempo.h')
-rw-r--r--libs/ardour/ardour/tempo.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h
index 0ca3b71ec7..b8b64fa37f 100644
--- a/libs/ardour/ardour/tempo.h
+++ b/libs/ardour/ardour/tempo.h
@@ -213,6 +213,8 @@ class TempoMap : public PBD::StatefulDestructible
operator Timecode::BBT_Time() const { return bbt(); }
operator framepos_t() const { return frame; }
+ bool is_bar() const { return beat == 1; }
+
BBTPoint (const Meter& m, const Tempo& t, framepos_t f,
uint32_t b, uint32_t e)
: frame (f), meter (&m), tempo (&t), bar (b), beat (e) {}