Fix record w/count-in
The pre-nutemo code used fmod() to calculate the offset into the bar:
`bar_fract = fmod (barbeat, 1.0); // fraction of bar elapsed`
with nutempo, beats start at 1, and the tick offset must also be
taken into account.
The bug was introduced in f67029bd0
This commit is contained in:
parent
65b7b3f2eb
commit
4825d67c4a
@ -553,7 +553,7 @@ Session::start_transport (bool after_loop)
|
||||
const double num = tempometric.divisions_per_bar ();
|
||||
/* XXX possible optimization: get meter and BBT time in one call */
|
||||
const Temporal::BBT_Time bbt = tmap->bbt_at (timepos_t (_transport_sample));
|
||||
const double bar_fract = (double) bbt.beats / tempometric.divisions_per_bar();
|
||||
const double bar_fract = (bbt.beats - 1.0 + bbt.ticks / (double)Temporal::ticks_per_beat) / tempometric.divisions_per_bar();
|
||||
|
||||
_count_in_samples = tempometric.samples_per_bar (_current_sample_rate);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user