14da117bc880ebcc8a805348a97acdae31b2753b
This fixes various rounding issues. Notably superclock to sample conversion must always round down when playing forward. `::process (start, end, speed = 1)` uses exclusive end. Processing begins at `start` and end ends just before `end`. Next cycle will begin with the current end. One example where this failed: - New session at 48kHz - Change tempo to 130 BPM - Enable snap to 1/8 note - Snap playhead to 1|3|0 - Enable Metronome - Play `assert (superclock_to_samples ((*i).sclock(), sample_rate()) < end);` end = 177231 samples == superclock 1042118280 A grid point is found at superclock 1042116920 (that is < 1042118280). However converting it back to samples rounded it to sample 177231 == end, while actual location is 1360 super-clock ticks before end. The metronome click has to be started this cycle, since the same position will not be found at the beginning of the next cycle, with start = 177232. Similarly a samplecnt_t t, converted to music-time and back must not be later than the given sample. ``` timepos_t tsc (t); assert (timepos_t::from_ticks (tsc.ticks ()).samples () <= t); ``` IOW. When playing forward, all super-clock time between 1|1|0 and 1|1|1 should round down to 1|1|0. "We have not yet reached the first tick".
Please see the Ardour web site at https://ardour.org/ for all documentation..
For information on building ardour:
https://ardour.org/development.html
Description
Languages
C++
56.5%
C
39.6%
JavaScript
1.3%
Lua
0.9%
Python
0.6%
Other
0.9%