fix: sampler broke without vibrato

This commit is contained in:
Felix Roos 2023-11-09 09:21:40 +01:00
parent 0052d349d9
commit 2a09f9ef0b

View file

@ -300,7 +300,7 @@ export async function onTriggerSample(t, value, onended, bank, resolveUrl) {
envelope.connect(out); envelope.connect(out);
bufferSource.onended = function () { bufferSource.onended = function () {
bufferSource.disconnect(); bufferSource.disconnect();
vibratoOscillator.stop(); vibratoOscillator?.stop();
envelope.disconnect(); envelope.disconnect();
out.disconnect(); out.disconnect();
onended(); onended();