summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-11-12 05:47:05 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-11-12 05:47:05 +0000
commit7857ec8b456d6fc233d1ee9b111744fc831dccca (patch)
tree3ed7547a518465b471b9bc835ce84389602edaf9 /libs
parentc4c25e19bc75354ffc69e258c9f167ad586a1cd9 (diff)
comments for BBT math methods; remove chunks from GUI; split location UI into a widget and a window; add the widget part to the editor RHS notebook. this is unfinished - it looks absurd. but its the starting point for a reworking of the location UI in its rightful place
git-svn-id: svn://localhost/ardour2/branches/3.0@6071 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/tempo.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc
index b8144d6e3c..f1248b11aa 100644
--- a/libs/ardour/tempo.cc
+++ b/libs/ardour/tempo.cc
@@ -1684,11 +1684,14 @@ TempoMap::bbt_add (const BBT_Time& start, const BBT_Time& other) const
return bbt_add (start, other, metric);
}
+/**
+ * add the BBT interval @param increment to @param start and return the result
+ */
BBT_Time
-TempoMap::bbt_add (const BBT_Time& start, const BBT_Time& other, const TempoMetric& metric) const
+TempoMap::bbt_add (const BBT_Time& start, const BBT_Time& increment, const TempoMetric& metric) const
{
BBT_Time result = start;
- BBT_Time op = other;
+ BBT_Time op = increment; /* argument is const, but we need to modify it */
uint32_t ticks = result.ticks + op.ticks;
if (ticks >= Meter::ticks_per_beat) {
@@ -1780,11 +1783,14 @@ TempoMap::bbt_add (const BBT_Time& start, const BBT_Time& other, const TempoMetr
return result;
}
+/**
+ * subtract the BBT interval @param decrement from @param start and return the result
+ */
BBT_Time
-TempoMap::bbt_subtract (const BBT_Time& start, const BBT_Time& other) const
+TempoMap::bbt_subtract (const BBT_Time& start, const BBT_Time& decrement) const
{
BBT_Time result = start;
- BBT_Time op = other;
+ BBT_Time op = decrement; /* argument is const, but we need to modify it */
if (op.ticks > result.ticks) {
/* subtract an extra beat later; meanwhile set ticks to the right "carry" value */