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

    {
        int returnValue;
        int done;
        /* Setup jmp for return after an exit(). */
        if ((returnValue = setjmp(csound->exitjmp))) {
#ifndef MACOSX
            csoundMessage(csound, Str("Early return from csoundPerformBuffer().\n"));
#endif
            return ((returnValue - CSOUND_EXITJMP_SUCCESS) | CSOUND_EXITJMP_SUCCESS);
        }
        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