diff --git a/lib/mixer.js b/lib/mixer.js index 1572d58..26d5452 100644 --- a/lib/mixer.js +++ b/lib/mixer.js @@ -87,6 +87,10 @@ Mixer.prototype.input = function (args) { sampleRate: args.sampleRate || this.sampleRate }); this.inputs.push(input); + + input.on('finish', () =>{ + this.inputs.splice(this.inputs.indexOf(input), 1); + }); return input; };