make 'now' fields Arc<AtomicUsize>

This commit is contained in:
🪞👃🪞 2024-10-23 00:33:01 +03:00
parent c88cb86532
commit 694aed6d9b
3 changed files with 7 additions and 4 deletions

View file

@ -102,7 +102,7 @@ impl Content for PhraseEditor<Tui> {
|to:[u16;2]|Ok(Some(to.clip_h(1))),
move|to: &mut TuiOutput|{
if let Some(_) = phrase {
let now = 0; // TODO FIXME: self.now % phrase.read().unwrap().length;
let now = self.now.load(Ordering::Relaxed); // TODO FIXME: self.now % phrase.read().unwrap().length;
let ScaledAxis { start: first_beat, scale: time_zoom, clamp, .. } = time_axis;
let clamp = clamp.expect("time_axis of sequencer expected to be clamped");
for x in 0..clamp/time_zoom {