MCPcopy Create free account
hub / github.com/csound/csound / reset

Function reset

Emscripten/module/src/CsoundScriptProcessorNode.js:512–532  ·  view source on GitHub ↗

Resets the Csound engine. * @memberof CsoundMixin

()

Source from the content-addressed store, hash-verified

510 */
511
512 reset() {
513 this.started = false;
514 this.running = false;
515 CSOUND.reset(this.csound);
516 CSOUND.setMidiCallbacks(this.csound);
517 CSOUND.setOption(this.csound, "-odac");
518 CSOUND.setOption(this.csound, "-iadc");
519 CSOUND.setOption(this.csound, "-M0");
520 CSOUND.setOption(this.csound, "-+rtaudio=null");
521 CSOUND.setOption(this.csound, "-+rtmidi=null");
522 var sampleRate = this.audioContext.sampleRate;
523 CSOUND.setOption(this.csound, "--sample-rate=" + sampleRate);
524 CSOUND.prepareRT(this.csound);
525 CSOUND.setOption(this.csound, "--nchnls=" + this.nchnls);
526 CSOUND.setOption(this.csound, "--nchnls_i=" + this.nchnls_i);
527 this.csoundOutputBuffer = null;
528 this.ksmps = null;
529 this.zerodBFS = null;
530
531 this.firePlayStateChange();
532 },
533
534 destroy() {
535 CSOUND.destroy(this.csound);

Callers

nothing calls this directly

Calls 3

resetMethod · 0.45
setOptionMethod · 0.45
firePlayStateChangeMethod · 0.45

Tested by

no test coverage detected