mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
wip: correct cycle timings (jitter eats notes)
This commit is contained in:
parent
e83802e1fd
commit
665885f6ff
5 changed files with 90 additions and 76 deletions
14
src/main.rs
14
src/main.rs
|
|
@ -237,17 +237,23 @@ process!(App |self, _client, scope| {
|
|||
}
|
||||
self.playing = Some(transport.state);
|
||||
self.playhead = transport.pos.frame() as usize;
|
||||
let frame = scope.last_frame_time() as usize;
|
||||
let frames = scope.n_frames() as usize;
|
||||
let CycleTimes {
|
||||
current_frames,
|
||||
current_usecs,
|
||||
next_usecs,
|
||||
period_usecs
|
||||
} = scope.cycle_times().unwrap();
|
||||
for track in self.tracks.iter_mut() {
|
||||
track.process(
|
||||
self.midi_in.as_ref().unwrap().iter(scope),
|
||||
&self.timebase,
|
||||
self.playing,
|
||||
&scope,
|
||||
self.playhead,
|
||||
frames,
|
||||
panic,
|
||||
&scope,
|
||||
(current_frames as usize, frames),
|
||||
(current_usecs as usize, next_usecs.saturating_sub(current_usecs) as usize),
|
||||
period_usecs as f64
|
||||
);
|
||||
}
|
||||
Control::Continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue