Resets the Csound engine. * @memberof CsoundMixin
()
| 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); |
nothing calls this directly
no test coverage detected