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

PUBLIC int csoundPerformKsmps ( CSOUND  ) 

Senses input events, and performs one control sample worth (ksmps) of audio output. Note that csoundCompile must be called first. Returns false during performance, and true when performance is finished. If called until it returns true, will perform an entire score. Enables external software to control the execution of Csound, and to synchronize performance with audio input and output.

Definition at line 1362 of file csound.c.

Referenced by CsoundPerformanceThread::Perform().

  {
      int done;
      int returnValue;
      /* setup jmp for return after an exit() */
      if ((returnValue = setjmp(csound->exitjmp))) {
#ifndef MACOSX
        csoundMessage(csound, "Early return from csoundPerformKsmps().\n");
#endif
        return ((returnValue - CSOUND_EXITJMP_SUCCESS) | CSOUND_EXITJMP_SUCCESS);
      }
      do {
        if (UNLIKELY((done = sensevents(csound)))) {
          csoundMessage(csound, "Score finished in csoundPerformKsmps().\n");
          return done;
        }
      } while (kperf(csound));
      return 0;
  }


Generated by  Doxygen 1.6.0   Back to index