13
0
livetrax/libs/temporal
Mads Kiilerich 80ffa58c81 temporal: introduce Temporal::reset() with TempoMap initialization
Ardour uses some global variables and singletons. These global variables
can be initialized with a value prior to program execution (especially
if they are const), but some of the static variables are modified, and
it is crucial that they always are reset when switching to another
session. To keep things simple and explicit and consistent, we thus
introduce Temporal::reset() to reset TempoMap (and later on also the
superclock rate). This is somewhat similar to Temporal::init(), which
usually only is invoked once (on program start) to initialize singletons
(such as the TempoMap).

9964f20c added TempoMap initialization to Session::create() ... but only
when not using a template. This create method is mainly preparing the
filesystem for a new session, and TempoMap initialization doesn't seem
like a perfect fit for it. It also seemed odd that it only initialized
TempoMap for clean new sessions, while existing sessions and templates
initialized it elsewhere.

Instead, invoke the TempoMap initialization early in the Session
creation process. This might introduce an extra and unnecessary TempoMap
initialization when loading an existing session or using a template, but
that will be cheap and do no harm, while providing a guarantee that we
always use the same default value.
2023-09-20 12:30:53 -06:00
..
MSVCtemporal
temporal temporal: introduce Temporal::reset() with TempoMap initialization 2023-09-20 12:30:53 -06:00
test temporal: unit testing more like unit testing 2023-06-08 14:01:17 -06:00
bbt_time.cc temporal: add BBT_Time::round_up_to_beat_div() 2023-09-04 19:41:25 -06:00
beats.cc
debug.cc
domain.cc add get/set state methods to TimeDomainProvider 2023-08-16 16:33:17 -06:00
enums.cc temporal: introduce Temporal::reset() with TempoMap initialization 2023-09-20 12:30:53 -06:00
range.cc temporal: operator<< for Range and RangeList 2023-03-24 14:19:16 -06:00
superclock.cc
tempo.cc temporal: fix weird typo in tempo map cut/copy code 2023-09-19 14:16:18 -06:00
test2.cc
test.cc
time.cc
timeline.cc temporal: reference time for BBT_Argument is always superclocks 2023-06-30 12:10:50 -06:00
wscript wscript: drop unused "mandatory variables" 'top' and 'out' in libs 2023-09-17 07:34:55 -06:00