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 1385 of file csound.c.

Referenced by ControlWindow::csound_thread_routine(), and CsoundPerformanceThread::Perform().

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

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index