disposeSynth method

  1. @override
Future<void> disposeSynth(
  1. String synthId
)
override

Implementation

@override
Future<void> disposeSynth(String synthId) async {
  await cancelScheduledNotes(synthId: synthId);
  final synth = _synths.remove(synthId);
  if (synth == null) {
    return;
  }
  synth.synth.callMethod<JSAny?>('dispose'.toJS);
  synth.gain.callMethod<JSAny?>('dispose'.toJS);
  synth.filter?.callMethod<JSAny?>('dispose'.toJS);
}