don't clear the activeVoices array when releasing all

actives voices will be cleared on it's own

fixes #676
This commit is contained in:
Yotam Mann 2020-06-17 14:08:25 -04:00
parent 127a62da5a
commit de95b27af0

View file

@ -367,12 +367,11 @@ export class PolySynth<Voice extends Monophonic<any> = Synth> extends Instrument
* Trigger the release portion of all the currently active voices immediately.
* Useful for silencing the synth.
*/
releaseAll(): this {
const now = this.now();
releaseAll(time?: Time): this {
const computedTime = this.toSeconds(time);
this._activeVoices.forEach(({ voice }) => {
voice.triggerRelease(now);
voice.triggerRelease(computedTime);
});
this._activeVoices = [];
return this;
}