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

PUBLIC int csoundPerform ( CSOUND *   ) 

Senses input events and performs audio output until the end of score is reached (positive return value), an error occurs (negative return value), or performance is stopped by calling csoundStop() from another thread (zero return value). Note that csoundCompile must be called first. In the case of zero return value, csoundPerform() can be called again to continue the stopped performance. Otherwise, csoundReset() should be called to clean up after the finished or failed performance.

Definition at line 1439 of file csound.c.

Referenced by csoundPerformCsd().

      int done;
      int returnValue;
      csound->performState = 0;
      /* setup jmp for return after an exit() */
      if ((returnValue = setjmp(csound->exitjmp))) {
#ifndef MACOSX
        csoundMessage(csound, Str("Early return from csoundPerform().\n"));
      do {
        do {
          if ((done = sensevents(csound))) {
            csoundMessage(csound, Str("Score finished in csoundPerform().\n"));
            return done;
        } while (kperf(csound));
      } while ((unsigned char) csound->performState == (unsigned char) 0);
      csoundMessage(csound, Str("csoundPerform(): stopped.\n"));
      csound->performState = 0;
      return 0;

Generated by  Doxygen 1.6.0   Back to index