mirror of
https://github.com/Tonejs/Tone.js
synced 2025-01-14 04:43:54 +00:00
clamp the overlap range
This commit is contained in:
parent
6337227155
commit
37c9f638de
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue