int CsoundObj_process(CsoundObj *self, int inNumberFrames, double *inputBuffer, double *outputBuffer) { int result = csoundPerformKsmps(self->csound); if (result == 0) { int outputChannelCount = csoundGetNchnls(self->csound); int inputChannelCount = csoundGetNchnlsInput(self->csound); self->csoundOut = csoundGetSpout(self->csound); self->csoundIn = csoundGetSpin(self->csound); if (self->useAudioInput == 1) { memcpy(self->csoundIn, inputBuffer, sizeof(double) * inNumberFrames); } memcpy(outputBuffer, self->csoundOut, sizeof(double) * inNumberFrames * outputChannelCount); // printf("csoundOut =%f outputBuffer = %f\n", self->csoundOut[0], outputBuffer[0]); } return result; }
int CsoundObj_getInputChannelCount(CsoundObj *self) { return csoundGetNchnlsInput(self->csound); }
uint32_t CsoundObj_getNchnlsInput(CsoundObj *self) { return csoundGetNchnlsInput(self->csound); }