13
0
livetrax/libs/temporal
Robin Gareus 8240875379
Prevent overflow for huge time values (fix 99h clock limit @96kHz)
The default clock-limit is 99:59:59:00, just under 360000 seconds
(see ARDOUR_UI::parameter_changed, clock-display-limit).

AudioClock calculates this limit pos as
`timepos_t (limit_sec * _session->sample_rate())`

This caused an overflow leading to a negative value:
```
   timepos_t (359999 * 96000)
   samples_to_superclock (359999 * 96000, 96000)
   int_div_round (359999 * 96000 * 282240000, 96000)
```

Ideally this will be optimized, here the sample-rate cancels out,
so we could use a c'tor usin seconds.
In other cases we could cache the pre-calculated sc_per_sample:
`superclock_ticks_per_second() / superclock_t (sr)` which is an
integer for all commonly used sample-rates.
2022-10-16 18:46:36 +02:00
..
MSVCtemporal
temporal Prevent overflow for huge time values (fix 99h clock limit @96kHz) 2022-10-16 18:46:36 +02:00
test fix RangeTest to account for Range now using exclusive ends, not inclusive 2022-10-05 17:30:45 -06:00
bbt_time.cc temporal: fix a bug in BBT_Time::round_up_to_bar() 2022-08-03 10:59:29 -06:00
beats.cc temporal: fix a bug in BBT_Time::round_up_to_bar() 2022-08-03 10:59:29 -06:00
debug.cc temporal: add new debug bit for debug tracing just TempoMap::reset_starting_at() 2022-05-13 19:05:13 -06:00
enums.cc libtemporal: add operator<<() for ratio_t 2021-08-13 12:51:32 -06:00
range.cc Remove Range::squish debug information, used fixed modulo operation 2022-06-30 01:07:32 +02:00
superclock.cc increase superclock_ticks_per_second to provide integer handling for NTSC (following Facebook "flicks") 2022-10-13 18:05:49 -06:00
tempo.cc remove some debug output 2022-09-21 09:13:26 -06:00
test2.cc tweak test code to check int62_t::min and flag bit 2021-08-13 12:51:30 -06:00
test.cc basic work on a Tempo object that avoids (almost) all floating point arithmetic 2021-08-13 12:51:28 -06:00
time.cc
timeline.cc Fix timecnt_t modulo operation when mixing time-domains 2022-06-30 01:07:32 +02:00
wscript More unit-tests updates 2022-10-01 16:57:12 +02:00