mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
launch pt.11: add start correction to switchover
This commit is contained in:
parent
02a4cf8a0a
commit
5e7609d035
1 changed files with 3 additions and 1 deletions
|
|
@ -110,7 +110,9 @@ impl PhrasePlayer {
|
|||
if let Some((start_at, phrase)) = &self.next_phrase {
|
||||
let start = start_at.sample.get() as usize;
|
||||
// If it's time to switch to the next phrase:
|
||||
if start <= sample0 {
|
||||
if start <= sample0.saturating_sub(
|
||||
self.clock.started.read().unwrap().unwrap().0
|
||||
) {
|
||||
// Samples elapsed since phrase was supposed to start
|
||||
let skipped = sample0 - start;
|
||||
// Switch over to enqueued phrase
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue