fix latency issues for larger intervals
This commit is contained in:
parent
24f8f48a2f
commit
d0b07c4890
1 changed files with 2 additions and 1 deletions
|
|
@ -42,7 +42,8 @@ export class Scheduler {
|
||||||
if (!hap.part.begin.equals(hap.whole.begin)) {
|
if (!hap.part.begin.equals(hap.whole.begin)) {
|
||||||
return;
|
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 duration = hap.duration / this.cps; // TODO: use legato / duration of objectified value
|
||||||
const now = getTime();
|
const now = getTime();
|
||||||
const deadline = scheduled - now;
|
const deadline = scheduled - now;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue