implement and adopt new conventions for AudioClock use

The class now has two separate methods for setting a duration or a point
value. They MUST be used appropriately, because their behavior is different.

When ::set_duration() is used in timecode mode, an extent (inclusive-end
length) is shown rather than a length.

Some objects, such as the TimeInfoBox, now deliberately shown an inclusive end
for their "end" clock, but this not universally followed, pending more feedback
from users and investigating of conventions in other DAWs.
This commit is contained in:
Paul Davis 2022-10-07 16:12:27 -06:00
parent 1ce17c1903
commit 45e21de209
22 changed files with 189 additions and 199 deletions

View file

@ -334,7 +334,11 @@ RegionEditor::length_clock_changed ()
in_command = true;
_region->clear_changes ();
_region->trim_end (_region->position() + len.decrement());
/* new end is actually 1 domain unit before the clock duration
* would otherwise indicate
*/
const timepos_t new_end = (_region->position() + len).decrement_by_domain ();
_region->trim_end (new_end);
_session->add_command(new StatefulDiffCommand (_region));
}