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

PUBLIC int csoundInitializeCscore ( CSOUND *  ,
FILE *  insco,
FILE *  outsco 

csoundInitializeCscore() prepares an instance of Csound for Cscore processing outside of running an orchestra (i.e. "standalone Cscore"). It is an alternative to csoundPreCompile(), csoundCompile(), and csoundPerform*() and should not be used with these functions. You must call this function before using the interface in "cscore.h" when you do not wish to compile an orchestra. Pass it the already open FILE* pointers to the input and output score files. It returns CSOUND_SUCCESS on success and CSOUND_INITIALIZATION or other error code if it fails.

Definition at line 810 of file cscorfns.c.

References csoundInitializeCscore().

Referenced by csoundInitializeCscore().

    EVENT   *next;

    if (insco == NULL) {
                       Str("csoundInitializeCscore: no input score given."));
    if (outsco == NULL) {
                       Str("csoundInitializeCscore: no output score given."));
    csound->scfp = insco;
    csound->oscfp = outsco;

    next = cscoreCreateEvent(csound, PMAX); /* creat EVENT blk receiving buf */
    next->op = '\0';
    savinfdata(csound, csound->scfp,
               next, FL(0.0), 1, 0, 0);    /* curuntil 0, wasend, non-warp, not eof */
    makecurrent(csound, csound->scfp);  /* make all this current         */

    return CSOUND_SUCCESS;

Generated by  Doxygen 1.6.0   Back to index