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

PUBLIC int csoundPerformKsmps ( void *  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 159 of file csound.c.

  {
    int done = 0;
    volatile int returnValue;
    /* setup jmp for return after an exit()
     */
    if (returnValue = setjmp(csoundJump_))
      {
        csoundMessage(csound, "Early return from csoundPerformKsmps().");
        return returnValue;
      }
    done = sensevents();
    if (!done && kcnt)
      {
        /*
                Rather than overriding real-time event handling in kperf,
                turn it off before calling kperf, and back on afterwards.
        */
        int rtEvents = O.RTevents;
        O.RTevents = 0;
        kperf(1);
        kcnt -= 1;
        O.RTevents = rtEvents;
      }
    return done;
  }


Generated by  Doxygen 1.6.0   Back to index