From 7857ec8b456d6fc233d1ee9b111744fc831dccca Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 12 Nov 2009 05:47:05 +0000 Subject: 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 --- libs/ardour/tempo.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'libs/ardour/tempo.cc') 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 */ -- cgit v1.2.3