mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-13 06:19:33 -04:00
fix latency issues for larger intervals
This commit is contained in:
@@ -42,7 +42,8 @@ export class Scheduler {
|
||||
if (!hap.part.begin.equals(hap.whole.begin)) {
|
||||
return;
|
||||
}
|
||||
const scheduled = time + (hap.whole.begin - begin) / this.cps + latency - passed; // this took me ages...
|
||||
// the following line took me ages to come up with.. handle with care
|
||||
const scheduled = time + (hap.whole.begin - begin) / this.cps - passed + interval + latency;
|
||||
const duration = hap.duration / this.cps; // TODO: use legato / duration of objectified value
|
||||
const now = getTime();
|
||||
const deadline = scheduled - now;
|
||||
|
||||
Reference in New Issue
Block a user