clamp the overlap range

This commit is contained in:
Yotam Mann 2020-07-19 10:16:30 -07:00
parent 6337227155
commit 37c9f638de

View file

@ -300,7 +300,9 @@ export class GrainPlayer extends Source<GrainPlayerOptions> {
return this._overlap;
}
set overlap(time) {
this._overlap = this.toSeconds(time);
const computedTime = this.toSeconds(time);
assertRange(computedTime, 0);
this._overlap = computedTime;
}
/**