drawing and singing fixes

This commit is contained in:
facile pop culture reference 2026-06-24 06:37:07 +03:00
parent e0781571c4
commit 0273d2ac75
7 changed files with 244 additions and 195 deletions

22
src/sing/jack_perf.rs Normal file
View file

@ -0,0 +1,22 @@
use crate::{*, time::PerfModel};
pub use ::jack::{*, contrib::{*, ClosureProcessHandler}};
pub trait JackPerfModel {
fn update_from_jack_scope (&self, t0: Option<u64>, scope: &ProcessScope);
}
impl JackPerfModel for PerfModel {
fn update_from_jack_scope (&self, t0: Option<u64>, scope: &ProcessScope) {
if let Some(t0) = t0 {
let t1 = self.clock.raw();
self.used.store(
self.clock.delta_as_nanos(t0, t1) as f64,
Relaxed,
);
self.window.store(
scope.cycle_times().unwrap().period_usecs as f64,
Relaxed,
);
}
}
}