Logo Search packages:      
Sourcecode: csound version File versions  Download package

PUBLIC int csoundPerformBuffer ( CSOUND  ) 

Performs Csound, sensing real-time and score events and processing one buffer's worth (-b frames) of interleaved audio. Returns a pointer to the new output audio in 'outputAudio' Note that csoundCompile must be called first, then call csoundGetOutputBuffer() and csoundGetInputBuffer() to get the pointer to csound's I/O buffers. Returns false during performance, and true when performance is finished.

Definition at line 1401 of file csound.c.

References CSOUND_::nspout.

      int returnValue;
      int done;
      /* Setup jmp for return after an exit(). */
      if ((returnValue = setjmp(csound->exitjmp))) {
#ifndef MACOSX
        csoundMessage(csound, "Early return from csoundPerformBuffer().\n");
      csound->sampsNeeded += csound->oparms_.outbufsamps;
      while (csound->sampsNeeded > 0) {
        do {
          if (UNLIKELY((done = sensevents(csound))))
            return done;
        } while (kperf(csound));
        csound->sampsNeeded -= csound->nspout;
      return 0;

Generated by  Doxygen 1.6.0   Back to index