Fix bar start position calculation
This commit is contained in:
parent
5fa2382c8c
commit
963d1bd14f
|
@ -338,7 +338,7 @@ impl Transport {
|
|||
(Some(time_sig_numerator), Some(time_sig_denominator), Some(pos_beats)) => {
|
||||
let quarter_note_bar_length =
|
||||
time_sig_numerator as f64 / time_sig_denominator as f64 * 4.0;
|
||||
Some(pos_beats.div_euclid(quarter_note_bar_length))
|
||||
Some((pos_beats / quarter_note_bar_length).floor() * quarter_note_bar_length)
|
||||
}
|
||||
(_, _, _) => None,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue