mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
maximum diff between frames
This commit is contained in:
parent
9b599642ca
commit
df30c40bd3
1 changed files with 2 additions and 0 deletions
|
@ -221,6 +221,8 @@ define(["Tone/core/Tone", "Tone/signal/TimelineSignal", "Tone/core/TimelineState
|
|||
var time = this.now();
|
||||
if (this._lastUpdate !== -1){
|
||||
var diff = (time - this._lastUpdate);
|
||||
//max size on the diff
|
||||
diff = Math.min(10 * UPDATE_RATE/1000, diff);
|
||||
//averaging
|
||||
this._computedLookAhead = (9 * this._computedLookAhead + diff) / 10;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue