CsoundWeb constructor

CsoundWeb({
  1. Function? onReady,
  2. Function? onStop,
})

Implementation

CsoundWeb({Function? onReady, Function? onStop}) {
  if(onReady != null) {
    onReadyCallback = onReady;
  }
  if(onStop != null) {
    onStopCallback = onStop;
  }

  initializeCsound().then((value) {
    //resumeAudioState();
    //_csound = CsoundJsDart();
    _csound = CsoundJsDart();
    //_csound = createCsound();
    onReadyCallback.call();
  });

}