csoundCore.h

Go to the documentation of this file.
00001 /*
00002     csoundCore.h:
00003 
00004     Copyright (C) 1991-2006 Barry Vercoe, John ffitch, Istvan Varga
00005 
00006     This file is part of Csound.
00007 
00008     The Csound Library is free software; you can redistribute it
00009     and/or modify it under the terms of the GNU Lesser General Public
00010     License as published by the Free Software Foundation; either
00011     version 2.1 of the License, or (at your option) any later version.
00012 
00013     Csound is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016     GNU Lesser General Public License for more details.
00017 
00018     You should have received a copy of the GNU Lesser General Public
00019     License along with Csound; if not, write to the Free Software
00020     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00021     02111-1307 USA
00022 */
00023 
00024 #if !defined(__BUILDING_LIBCSOUND) && !defined(CSOUND_CSDL_H)
00025 #  error "Csound plugins and host applications should not include csoundCore.h"
00026 #endif
00027 
00028 #ifndef CSOUNDCORE_H
00029 #define CSOUNDCORE_H
00030 
00031 #include "sysdep.h"
00032 
00033 #include <stdarg.h>
00034 #include <setjmp.h>
00035 #include <sndfile.h>
00036 
00037 #include "csound.h"
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00043 #define OK        (0)
00044 #define NOTOK     (-1)
00045 
00046 #define CSFILE_FD_R     1
00047 #define CSFILE_FD_W     2
00048 #define CSFILE_STD      3
00049 #define CSFILE_SND_R    4
00050 #define CSFILE_SND_W    5
00051 
00052 #define MAXINSNO  (200)
00053 #define PMAX      (1000)
00054 #define VARGMAX   (1001)
00055 
00056 #define ORTXT       h.optext->t
00057 #define INCOUNT     ORTXT.inlist->count
00058 #define OUTCOUNT    ORTXT.outlist->count
00059 #define INOCOUNT    ORTXT.inoffs->count
00060 #define OUTOCOUNT   ORTXT.outoffs->count
00061 #define XINCODE     ORTXT.xincod
00062 #  define XINARG1   (p->XINCODE & 1)
00063 #  define XINARG2   (p->XINCODE & 2)
00064 #  define XINARG3   (p->XINCODE & 4)
00065 #  define XINARG4   (p->XINCODE & 8)
00066 #  define XINARG5   (p->XINCODE &16)
00067 #define XOUTCODE    ORTXT.xoutcod
00068 #define XSTRCODE    ORTXT.xincod_str
00069 #define XOUTSTRCODE ORTXT.xoutcod_str
00070 
00071 #define MAXLEN     0x1000000L
00072 #define FMAXLEN    ((MYFLT)(MAXLEN))
00073 #define PHMASK     0x0FFFFFFL
00074 #define PFRAC(x)   ((MYFLT)((x) & ftp->lomask) * ftp->lodiv)
00075 #define MAXPOS     0x7FFFFFFFL
00076 
00077 #define BYTREVS(n) ((n>>8  & 0xFF) | (n<<8 & 0xFF00))
00078 #define BYTREVL(n) ((n>>24 & 0xFF) | (n>>8 & 0xFF00L) | \
00079                     (n<<8 & 0xFF0000L) | (n<<24 & 0xFF000000L))
00080 
00081 #define OCTRES     8192
00082 #define CPSOCTL(n) ((MYFLT)(1 << ((int)(n) >> 13)) * cpsocfrc[(int)(n) & 8191])
00083 
00084 #define LOBITS     10
00085 #define LOFACT     1024
00086   /* LOSCAL is 1/LOFACT as MYFLT */
00087 #define LOSCAL     FL(0.0009765625)
00088 
00089 #define LOMASK     1023
00090 
00091 #define SSTRCOD    3945467
00092 #define SSTRSIZ    200
00093 #define ALLCHNLS   0x7fff
00094 #define DFLT_SR    FL(44100.0)
00095 #define DFLT_KR    FL(4410.0)
00096 #define DFLT_KSMPS 10
00097 #define DFLT_NCHNLS 1
00098 #define MAXCHNLS   256
00099 
00100 #define MAXNAME   (256)
00101 
00102 #define DFLT_DBFS (FL(32768.0))
00103 
00104 #define MAXOCTS         8
00105 #define MAXCHAN         16      /* 16 MIDI channels; only one port for now */
00106 
00107 #define ONEPT           1.02197486              /* A440 tuning factor */
00108 #define LOG10D20        0.11512925              /* for db to ampfac   */
00109 #define DV32768         FL(0.000030517578125)
00110 
00111 #ifndef PI
00112 #define PI      (3.1415926535897932384626433832795)
00113 #endif
00114 #define TWOPI   (6.28318530717958647692528676655901)
00115 #define PI_F    ((MYFLT) PI)
00116 #define TWOPI_F ((MYFLT) TWOPI)
00117 
00118 #define AMPLMSG 01
00119 #define RNGEMSG 02
00120 #define WARNMSG 04
00121 #define RAWMSG  0x40
00122 #define TIMEMSG 0x80
00123 #define IGN(X)  (void) X
00124 /* VL: this is a silly redefinition that can only
00125    cause confusion
00126 #define printf  use_csoundMessage_instead_of_printf
00127 */
00128   typedef struct {
00129     int     odebug;
00130     int     sfread, sfwrite, sfheader, filetyp;
00131     int     inbufsamps, outbufsamps;
00132     int     informat, outformat;
00133     int     sfsampsize;
00134     int     displays, graphsoff, postscript, msglevel;
00135     int     Beatmode, cmdTempo, oMaxLag;
00136     int     usingcscore, Linein;
00137     int     RTevents, Midiin, FMidiin, RMidiin;
00138     int     ringbell, termifend;
00139     int     rewrt_hdr, heartbeat, gen01defer;
00140     int     expr_opt;       /* IV - Jan 27 2005: for --expression-opt */
00141     float   sr_override, kr_override;
00142     char    *infilename, *outfilename, *playscore;
00143     char    *Linename, *Midiname, *FMidiname;
00144     char    *Midioutname;   /* jjk 09252000 - MIDI output device, -Q option */
00145     char    *FMidioutname;
00146     int     midiKey, midiKeyCps, midiKeyOct, midiKeyPch;
00147     int     midiVelocity, midiVelocityAmp;
00148     int     noDefaultPaths;  /* syy - Oct 25, 2006: for disabling relative paths
00149                               from files */
00150     int     numThreads;
00151     int     syntaxCheckOnly;
00152     int     useCsdLineCounts;
00153 #ifdef ENABLE_NEW_PARSER
00154     int     newParser; /* SYY - July 30, 2006: for --new-parser */
00155 #endif
00156   } OPARMS;
00157 
00158   typedef struct arglst {
00159     int     count;
00160     char    *arg[1];
00161   } ARGLST;
00162 
00163   typedef struct argoffs {
00164     int     count;
00165     int     indx[1];
00166   } ARGOFFS;
00167 
00171   typedef struct text {
00172     int     linenum;        /* Line num in orch file (currently buggy!)  */
00173     int     opnum;          /* Opcode index in opcodlst[] */
00174     char    *opcod;         /* Pointer to opcode name in global pool */
00175     ARGLST  *inlist;        /* Input args (pointer to item in name list) */
00176     ARGLST  *outlist;
00177     ARGOFFS *inoffs;        /* Input args (index into list of values) */
00178     ARGOFFS *outoffs;
00179     int     xincod;         /* Rate switch for multi-rate opcode functions */
00180     int     xoutcod;        /* output rate switch (IV - Sep 1 2002) */
00181     int     xincod_str;     /* Type switch for string arguments */
00182     int     xoutcod_str;
00183     char    intype;         /* Type of first input argument (g,k,a,w etc) */
00184     char    pftype;         /* Type of output argument (k,a etc) */
00185   } TEXT;
00186 
00191   typedef struct instr {
00192     struct op * nxtop;              /* Linked list of instr opcodes */
00193     TEXT    t;                      /* Text of instrument (same in nxtop) */
00194     int     pmax, vmax, pextrab;    /* Arg count, size of data for all
00195                                        opcodes in instr */
00196     int     mdepends;               /* Opcode type (i/k/a) */
00197     int     lclkcnt, dummy01;       /* Storage reqs for this instr */
00198     int     lclwcnt, lclacnt;
00199     int     lclpcnt, lclscnt;
00200     int     lclfixed, optxtcount;
00201     short   muted;
00202     long    localen;
00203     long    opdstot;                /* Total size of opds structs in instr */
00204     long    *inslist;               /* Only used in parsing (?) */
00205     MYFLT   *psetdata;              /* Used for pset opcode */
00206     struct insds * instance;        /* Chain of allocated instances of
00207                                        this instrument */
00208     struct insds * lst_instance;    /* last allocated instance */
00209     struct insds * act_instance;    /* Chain of free (inactive) instances */
00210                                     /* (pointer to next one is INSDS.nxtact) */
00211     struct instr * nxtinstxt;       /* Next instrument in orch (num order) */
00212     int     active;                 /* To count activations for control */
00213     int     maxalloc;
00214     MYFLT   cpuload;                /* % load this instrumemnt makes */
00215     struct opcodinfo *opcode_info;  /* IV - Nov 10 2002 */
00216     char    *insname;               /* instrument name */
00217   } INSTRTXT;
00218 
00223   typedef struct op {
00224     struct op *nxtop;
00225     TEXT    t;
00226   } OPTXT;
00227 
00228   typedef struct fdch {
00229     struct fdch *nxtchp;
00231     void    *fd;
00232   } FDCH;
00233 
00234   typedef struct auxch {
00235     struct auxch *nxtchp;
00236     long    size;
00237     void    *auxp, *endp;   /* was char* */
00238   } AUXCH;
00239 
00240   typedef struct monblk {
00241     short   pch;
00242     struct monblk *prv;
00243   } MONPCH;
00244 
00245   typedef struct {
00246     int     notnum[4];
00247   } DPEXCL;
00248 
00249   typedef struct {
00250     DPEXCL  dpexcl[8];
00252     int     exclset[75];
00253   } DPARM;
00254 
00255   typedef struct dklst {
00256     struct dklst *nxtlst;
00257     long    pgmno;
00259     MYFLT   keylst[1];
00260   } DKLST;
00261 
00262   typedef struct mchnblk {
00264     short   pgmno;
00266     short   insno;
00267     short   RegParNo;
00268     short   mono;
00269     MONPCH  *monobas;
00270     MONPCH  *monocur;
00272     struct insds *kinsptr[128];
00274     MYFLT   polyaft[128];
00276     MYFLT   ctl_val[136];
00278     short   pgm2ins[128];
00280     MYFLT   aftouch;
00282     MYFLT   pchbend;
00284     MYFLT   pbensens;
00286     MYFLT   dummy_;
00288     short   ksuscnt;
00290     short   sustaining;
00291     int     dpmsb;
00292     int     dplsb;
00293     int     datenabl;
00295     DKLST   *klists;
00297     DPARM   *dparms;
00298   } MCHNBLK;
00299 
00304   typedef struct insds {
00305     /* Chain of init-time opcodes */
00306     struct opds * nxti;
00307     /* Chain of performance-time opcodes */
00308     struct opds * nxtp;
00309     /* Next allocated instance */
00310     struct insds * nxtinstance;
00311     /* Previous allocated instance */
00312     struct insds * prvinstance;
00313     /* Next in list of active instruments */
00314     struct insds * nxtact;
00315     /* Previous in list of active instruments */
00316     struct insds * prvact;
00317     /* Next instrument to terminate */
00318     struct insds * nxtoff;
00319     /* Chain of files used by opcodes in this instr */
00320     FDCH    *fdchp;
00321     /* Extra memory used by opcodes in this instr */
00322     AUXCH   *auxchp;
00323     /* Extra release time requested with xtratim opcode */
00324     int     xtratim;
00325     /* MIDI note info block if event started from MIDI */
00326     MCHNBLK *m_chnbp;
00327     /* ptr to next overlapping MIDI voice */
00328     struct insds * nxtolap;
00329     /* Instrument number */
00330     short   insno;
00331     /* non-zero for sustaining MIDI note */
00332     short   m_sust;
00333     /* MIDI pitch, for simple access */
00334     unsigned char m_pitch;
00335     /* ...ditto velocity */
00336     unsigned char m_veloc;
00337     /* Flag to indicate we are releasing, test with release opcode */
00338     char    relesing;
00339     /* Set if instr instance is active (perfing) */
00340     char    actflg;
00341     /* Time to turn off event, in score beats */
00342     double  offbet;
00343     /* Time to turn off event, in seconds (negative on indef/tie) */
00344     double  offtim;
00345     /* Python namespace for just this instance. */
00346     void    *pylocal;
00347     /* pointer to Csound engine and API for externals */
00348     CSOUND  *csound;
00349     /* user defined opcode I/O buffers */
00350     void    *opcod_iobufs;
00351     void    *opcod_deact, *subins_deact;
00352     /* opcodes to be run at note deactivation */
00353     void    *nxtd;
00354     /* Copy of required p-field values for quick access */
00355     MYFLT   p0;
00356     MYFLT   p1;
00357     MYFLT   p2;
00358     MYFLT   p3;
00359   } INSDS;
00360 
00361   typedef int (*SUBR)(CSOUND *, void *);
00362 
00367   typedef struct opds {
00369     struct opds * nxti;
00371     struct opds * nxtp;
00373     SUBR    iopadr;
00375     SUBR    opadr;
00377     OPTXT   *optext;
00379     INSDS   *insdshead;
00380   } OPDS;
00381 
00382   typedef struct oentry {
00383     char    *opname;
00384     unsigned short  dsblksiz;
00385     unsigned short  thread;
00386     char    *outypes;
00387     char    *intypes;
00388     int     (*iopadr)(CSOUND *, void *p);
00389     int     (*kopadr)(CSOUND *, void *p);
00390     int     (*aopadr)(CSOUND *, void *p);
00391     void    *useropinfo;    /* user opcode parameters */
00392     int     prvnum;         /* IV - Oct 31 2002 */
00393   } OENTRY;
00394 
00395   typedef struct lblblk {
00396     OPDS    h;
00397     OPDS    *prvi;
00398     OPDS    *prvp;
00399   } LBLBLK;
00400 
00401   typedef struct {
00402     MYFLT   *begp, *curp, *endp, feedback[6];
00403     long    scount;
00404   } OCTDAT;
00405 
00406   typedef struct {
00407     long    npts, nocts, nsamps;
00408     MYFLT   lofrq, hifrq, looct, srate;
00409     OCTDAT  octdata[MAXOCTS];
00410     AUXCH   auxch;
00411   } DOWNDAT;
00412 
00413   typedef struct {
00414     long    ktimstamp, ktimprd;
00415     long    npts, nfreqs, dbout;
00416     DOWNDAT *downsrcp;
00417     AUXCH   auxch;
00418   } SPECDAT;
00419 
00423   typedef struct event {
00425     char    *strarg;
00427     char    opcod;
00429     short   pcnt;
00431     MYFLT   p2orig;
00433     MYFLT   p3orig;
00435     MYFLT   p[PMAX + 1];
00436   } EVTBLK;
00437 
00438   typedef struct {
00439     MYFLT   gen01;
00440     MYFLT   ifilno;
00441     MYFLT   iskptim;
00442     MYFLT   iformat;
00443     MYFLT   channel;
00444     MYFLT   sample_rate;
00445     char    strarg[SSTRSIZ];
00446   } GEN01ARGS;
00447 
00448   typedef struct {
00450     long    flen;
00452     long    lenmask;
00454     long    lobits;
00456     long    lomask;
00458     MYFLT   lodiv;
00460     MYFLT   cvtbas, cpscvt;
00462     short   loopmode1;
00464     short   loopmode2;
00466     long    begin1, end1;
00468     long    begin2, end2;
00470     long    soundend, flenfrms;
00472     long    nchanls;
00474     long    fno;
00476     GEN01ARGS gen01args;
00478     MYFLT   ftable[1];
00479   } FUNC;
00480 
00481   typedef struct {
00482     CSOUND  *csound;
00483     long    flen;
00484     int     fno, guardreq;
00485     EVTBLK  e;
00486   } FGDATA;
00487 
00488   typedef struct {
00489     char    *name;
00490     int     (*fn)(FGDATA *, FUNC *);
00491   } NGFENS;
00492 
00493   typedef int (*GEN)(FGDATA *, FUNC *);
00494 
00495   typedef struct MEMFIL {
00496     char    filename[256];      /* Made larger RWD */
00497     char    *beginp;
00498     char    *endp;
00499     long    length;
00500     struct MEMFIL *next;
00501   } MEMFIL;
00502 
00503   typedef struct {
00504     short   type;
00505     short   chan;
00506     short   dat1;
00507     short   dat2;
00508   } MEVENT;
00509 
00510   typedef struct SNDMEMFILE_ {
00512     char            *name;
00513     struct SNDMEMFILE_ *nxt;
00515     char            *fullName;
00517     size_t          nFrames;
00519     double          sampleRate;
00521     int             nChannels;
00523     int             sampleFormat;
00525     int             fileType;
00534     int             loopMode;
00536     double          startOffs;
00538     double          loopStart;
00540     double          loopEnd;
00542     double          baseFreq;
00544     double          scaleFac;
00546     float           data[1];
00547   } SNDMEMFILE;
00548 
00549   typedef struct pvx_memfile_ {
00550     char        *filename;
00551     struct pvx_memfile_ *nxt;
00552     float       *data;
00553     unsigned long nframes;
00554     int         format;
00555     int         fftsize;
00556     int         overlap;
00557     int         winsize;
00558     int         wintype;
00559     int         chans;
00560     MYFLT       srate;
00561   } PVOCEX_MEMFILE;
00562 
00563 #ifdef __BUILDING_LIBCSOUND
00564 
00565 #define INSTR   1
00566 #define ENDIN   2
00567 #define OPCODE  3
00568 #define ENDOP   4
00569 #define LABEL   5
00570 #define SETBEG  6
00571 #define PSET    6
00572 #define SETEND  7
00573 
00574 #define TOKMAX  50L     /* Should be 50 but bust */
00575 
00576 /* max number of input/output args for user defined opcodes */
00577 #define OPCODENUMOUTS_LOW   16
00578 #define OPCODENUMOUTS_HIGH  64
00579 #define OPCODENUMOUTS_MAX   256
00580 
00581 #define MBUFSIZ         (4096)
00582 #define MIDIINBUFMAX    (1024)
00583 #define MIDIINBUFMSK    (MIDIINBUFMAX-1)
00584 
00585   typedef union {
00586     unsigned long dwData;
00587     unsigned char bData[4];
00588   } MIDIMESSAGE;
00589 
00590   /* MIDI globals */
00591 
00592   typedef struct midiglobals {
00593     MEVENT  *Midevtblk;
00594     int     sexp;
00595     int     MIDIoutDONE;
00596     int     MIDIINbufIndex;
00597     MIDIMESSAGE MIDIINbuffer2[MIDIINBUFMAX];
00598     int     (*MidiInOpenCallback)(CSOUND *, void **, const char *);
00599     int     (*MidiReadCallback)(CSOUND *, void *, unsigned char *, int);
00600     int     (*MidiInCloseCallback)(CSOUND *, void *);
00601     int     (*MidiOutOpenCallback)(CSOUND *, void **, const char *);
00602     int     (*MidiWriteCallback)(CSOUND *, void *, const unsigned char *, int);
00603     int     (*MidiOutCloseCallback)(CSOUND *, void *);
00604     const char *(*MidiErrorStringCallback)(int);
00605     void    *midiInUserData;
00606     void    *midiOutUserData;
00607     void    *midiFileData;
00608     void    *midiOutFileData;
00609     int     rawControllerMode;
00610     char    muteTrackList[256];
00611     unsigned char mbuf[MBUFSIZ];
00612     unsigned char *bufp, *endatp;
00613     short   datreq, datcnt;
00614   } MGLOBAL;
00615 
00616   typedef struct eventnode {
00617     struct eventnode  *nxt;
00618     unsigned long     start_kcnt;
00619     EVTBLK            evt;
00620   } EVTNODE;
00621 
00622   typedef struct {
00623     OPDS    h;
00624     MYFLT   *ktempo, *istartempo;
00625     MYFLT   prvtempo;
00626   } TEMPO;
00627 
00628   typedef struct opcodinfo {
00629     long    instno;
00630     char    *name, *intypes, *outtypes;
00631     short   inchns, outchns, perf_incnt, perf_outcnt;
00632     short   *in_ndx_list, *out_ndx_list;
00633     INSTRTXT *ip;
00634     struct opcodinfo *prv;
00635   } OPCODINFO;
00636 
00637   typedef struct polish {
00638     char    opcod[12];
00639     int     incount;
00640     char    *arg[4];     /* Was [4][12] */
00641   } POLISH;
00642 
00643   typedef struct token {
00644     char    *str;
00645     short   prec;
00646   } TOKEN;
00647 
00648   typedef struct names {
00649     char    *mac;
00650     struct names *next;
00651   } NAMES;
00652 
00653   typedef struct threadInfo {
00654     struct threadInfo *next;
00655     void * threadId;
00656   } THREADINFO;
00657 
00658 #include "sort.h"
00659 #include "text.h"
00660 #include "prototyp.h"
00661 #include "cwindow.h"
00662 #include "envvar.h"
00663 #include "remote.h"
00664 
00665 #define CS_STATE_PRE    (1)
00666 #define CS_STATE_COMP   (2)
00667 #define CS_STATE_UTIL   (4)
00668 #define CS_STATE_CLN    (8)
00669 #define CS_STATE_JMP    (16)
00670 
00671 /* These are used to set/clear bits in csound->tempStatus.
00672    If the bit is set, it indicates that the given file is
00673    a temporary. */
00674 extern const uint32_t csOrcMask;
00675 extern const uint32_t csScoInMask;
00676 extern const uint32_t csScoSortMask;
00677 extern const uint32_t csMidiScoMask;
00678 extern const uint32_t csPlayScoMask;
00679 
00680 #endif  /* __BUILDING_LIBCSOUND */
00681 
00685   struct CSOUND_ {
00686     /* Csound API function pointers (320 total) */
00687     int (*GetVersion)(void);
00688     int (*GetAPIVersion)(void);
00689     void *(*GetHostData)(CSOUND *);
00690     void (*SetHostData)(CSOUND *, void *hostData);
00691     CSOUND *(*Create)(void *hostData);
00692     int (*Compile)(CSOUND *, int argc, char **argv);
00693     int (*Perform)(CSOUND *);
00694     int (*PerformKsmps)(CSOUND *);
00695     int (*PerformBuffer)(CSOUND *);
00696     int (*Cleanup)(CSOUND *);
00697     void (*Reset)(CSOUND *);
00698     void (*Destroy)(CSOUND *);
00699     MYFLT (*GetSr)(CSOUND *);
00700     MYFLT (*GetKr)(CSOUND *);
00701     int (*GetKsmps)(CSOUND *);
00702     int (*GetNchnls)(CSOUND *);
00703     int (*GetSampleFormat)(CSOUND *);
00704     int (*GetSampleSize)(CSOUND *);
00705     long (*GetInputBufferSize)(CSOUND *);
00706     long (*GetOutputBufferSize)(CSOUND *);
00707     MYFLT *(*GetInputBuffer)(CSOUND *);
00708     MYFLT *(*GetOutputBuffer)(CSOUND *);
00709     MYFLT *(*GetSpin)(CSOUND *);
00710     MYFLT *(*GetSpout)(CSOUND *);
00711     double (*GetScoreTime)(CSOUND *);
00712     void (*SetMakeXYinCallback)(CSOUND *,
00713                                 void (*)(CSOUND *, XYINDAT *, MYFLT, MYFLT));
00714     void (*SetReadXYinCallback)(CSOUND *, void (*)(CSOUND *, XYINDAT *));
00715     void (*SetKillXYinCallback)(CSOUND *, void (*)(CSOUND *, XYINDAT *));
00716     int (*IsScorePending)(CSOUND *);
00717     void (*SetScorePending)(CSOUND *, int pending);
00718     MYFLT (*GetScoreOffsetSeconds)(CSOUND *);
00719     void (*SetScoreOffsetSeconds)(CSOUND *, MYFLT offset);
00720     void (*RewindScore)(CSOUND *);
00721     CS_PRINTF2 void (*Message)(CSOUND *, const char *fmt, ...);
00722     CS_PRINTF3 void (*MessageS)(CSOUND *, int attr, const char *fmt, ...);
00723     void (*MessageV)(CSOUND *, int attr, const char *format, va_list args);
00724     void (*DeleteUtilityList)(CSOUND *, char **lst);
00725     void (*DeleteChannelList)(CSOUND *, CsoundChannelListEntry *lst);
00726     void (*SetMessageCallback)(CSOUND *,
00727                 void (*csoundMessageCallback)(CSOUND *,
00728                                               int attr, const char *format,
00729                                               va_list valist));
00730     void (*DeleteCfgVarList)(csCfgVariable_t **lst);
00731     int (*GetMessageLevel)(CSOUND *);
00732     void (*SetMessageLevel)(CSOUND *, int messageLevel);
00733     void (*InputMessage)(CSOUND *, const char *message__);
00734     void (*KeyPress)(CSOUND *, char c__);
00735     void (*SetInputValueCallback)(CSOUND *,
00736                 void (*inputValueCalback)(CSOUND *, const char *channelName,
00737                                                     MYFLT *value));
00738     void (*SetOutputValueCallback)(CSOUND *,
00739                 void (*outputValueCalback)(CSOUND *, const char *channelName,
00740                                                      MYFLT value));
00741     int (*ScoreEvent)(CSOUND *,
00742                       char type, const MYFLT *pFields, long numFields);
00743     void (*SetExternalMidiInOpenCallback)(CSOUND *,
00744                 int (*func)(CSOUND *, void **, const char *));
00745     void (*SetExternalMidiReadCallback)(CSOUND *,
00746                 int (*func)(CSOUND *, void *, unsigned char *, int));
00747     void (*SetExternalMidiInCloseCallback)(CSOUND *,
00748                 int (*func)(CSOUND *, void *));
00749     void (*SetExternalMidiOutOpenCallback)(CSOUND *,
00750                 int (*func)(CSOUND *, void **, const char *));
00751     void (*SetExternalMidiWriteCallback)(CSOUND *,
00752                 int (*func)(CSOUND *, void *, const unsigned char *, int));
00753     void (*SetExternalMidiOutCloseCallback)(CSOUND *,
00754                 int (*func)(CSOUND *, void *));
00755     void (*SetExternalMidiErrorStringCallback)(CSOUND *,
00756                 const char *(*func)(int));
00757     int (*SetIsGraphable)(CSOUND *, int isGraphable);
00758     void (*SetMakeGraphCallback)(CSOUND *,
00759                 void (*makeGraphCallback)(CSOUND *, WINDAT *p,
00760                                                     const char *name));
00761     void (*SetDrawGraphCallback)(CSOUND *,
00762                 void (*drawGraphCallback)(CSOUND *, WINDAT *p));
00763     void (*SetKillGraphCallback)(CSOUND *,
00764                 void (*killGraphCallback)(CSOUND *, WINDAT *p));
00765     void (*SetExitGraphCallback)(CSOUND *, int (*exitGraphCallback)(CSOUND *));
00766     int (*NewOpcodeList)(CSOUND *, opcodeListEntry **);
00767     void (*DisposeOpcodeList)(CSOUND *, opcodeListEntry *);
00768     int (*AppendOpcode)(CSOUND *, const char *opname, int dsblksiz,
00769                         int thread, const char *outypes, const char *intypes,
00770                         int (*iopadr)(CSOUND *, void *),
00771                         int (*kopadr)(CSOUND *, void *),
00772                         int (*aopadr)(CSOUND *, void *));
00773     int (*AppendOpcodes)(CSOUND *, const OENTRY *opcodeList, int n);
00774     int (*OpenLibrary)(void **library, const char *libraryPath);
00775     int (*CloseLibrary)(void *library);
00776     void *(*GetLibrarySymbol)(void *library, const char *procedureName);
00777     int (*CheckEvents)(CSOUND *);
00778     void (*SetYieldCallback)(CSOUND *, int (*yieldCallback)(CSOUND *));
00779     const char *(*GetEnv)(CSOUND *, const char *name);
00780     char *(*FindInputFile)(CSOUND *, const char *filename, const char *envList);
00781     char *(*FindOutputFile)(CSOUND *,
00782                             const char *filename, const char *envList);
00783     void (*SetPlayopenCallback)(CSOUND *,
00784                 int (*playopen__)(CSOUND *, const csRtAudioParams *parm));
00785     void (*SetRtplayCallback)(CSOUND *,
00786                 void (*rtplay__)(CSOUND *, const MYFLT *outBuf, int nbytes));
00787     void (*SetRecopenCallback)(CSOUND *,
00788                 int (*recopen__)(CSOUND *, const csRtAudioParams *parm));
00789     void (*SetRtrecordCallback)(CSOUND *,
00790                 int (*rtrecord__)(CSOUND *, MYFLT *inBuf, int nbytes));
00791     void (*SetRtcloseCallback)(CSOUND *, void (*rtclose__)(CSOUND *));
00792     void (*AuxAlloc)(CSOUND *, long nbytes, AUXCH *auxchp);
00793     void *(*Malloc)(CSOUND *, size_t nbytes);
00794     void *(*Calloc)(CSOUND *, size_t nbytes);
00795     void *(*ReAlloc)(CSOUND *, void *oldp, size_t nbytes);
00796     void (*Free)(CSOUND *, void *ptr);
00797     /* Internal functions that are needed */
00798     void (*dispset)(CSOUND *, WINDAT *, MYFLT *, long, char *, int, char *);
00799     void (*display)(CSOUND *, WINDAT *);
00800     int (*dispexit)(CSOUND *);
00801     MYFLT (*intpow)(MYFLT, long);
00802     MEMFIL *(*ldmemfile)(CSOUND *, const char *);  /* use ldmemfile2 instead */
00803     long (*strarg2insno)(CSOUND *, void *p, int is_string);
00804     char *(*strarg2name)(CSOUND *, char *, void *, const char *, int);
00805     int (*hfgens)(CSOUND *, FUNC **, const EVTBLK *, int);
00806     int (*insert_score_event)(CSOUND *, EVTBLK *, double);
00807     int (*FTAlloc)(CSOUND *, int tableNum, int len);
00808     int (*FTDelete)(CSOUND *, int tableNum);
00809     FUNC *(*FTFind)(CSOUND *, MYFLT *argp);
00810     FUNC *(*FTFindP)(CSOUND *, MYFLT *argp);
00811     FUNC *(*FTnp2Find)(CSOUND *, MYFLT *argp);
00812     int (*GetTable)(CSOUND *, MYFLT **tablePtr, int tableNum);
00813     SNDMEMFILE *(*LoadSoundFile)(CSOUND *, const char *, SF_INFO *);
00814     char *(*getstrformat)(int format);
00815     int (*sfsampsize)(int format);
00816     char *(*type2string)(int type);
00817     void *(*SAsndgetset)(CSOUND *,
00818                          char *, void *, MYFLT *, MYFLT *, MYFLT *, int);
00819     void *(*sndgetset)(CSOUND *, void *);
00820     int (*getsndin)(CSOUND *, void *, MYFLT *, int, void *);
00821     void (*rewriteheader)(SNDFILE *ofd);
00822     int (*Rand31)(int *seedVal);
00823     void (*FDRecord)(CSOUND *, FDCH *fdchp);
00824     void (*FDClose)(CSOUND *, FDCH *fdchp);
00825     void (*SetDebug)(CSOUND *, int d);
00826     int (*GetDebug)(CSOUND *);
00827     int (*TableLength)(CSOUND *, int table);
00828     MYFLT (*TableGet)(CSOUND *, int table, int index);
00829     void (*TableSet)(CSOUND *, int table, int index, MYFLT value);
00830     void *(*CreateThread)(uintptr_t (*threadRoutine)(void *), void *userdata);
00831     uintptr_t (*JoinThread)(void *thread);
00832     void *(*CreateThreadLock)(void);
00833     void (*DestroyThreadLock)(void *lock);
00834     int (*WaitThreadLock)(void *lock, size_t milliseconds);
00835     void (*NotifyThreadLock)(void *lock);
00836     void (*WaitThreadLockNoTimeout)(void *lock);
00837     void (*Sleep)(size_t milliseconds);
00838     void (*InitTimerStruct)(RTCLOCK *);
00839     double (*GetRealTime)(RTCLOCK *);
00840     double (*GetCPUTime)(RTCLOCK *);
00841     uint32_t (*GetRandomSeedFromTime)(void);
00842     void (*SeedRandMT)(CsoundRandMTState *p,
00843                        const uint32_t *initKey, uint32_t keyLength);
00844     uint32_t (*RandMT)(CsoundRandMTState *p);
00845     int (*PerformKsmpsAbsolute)(CSOUND *);
00846     char *(*LocalizeString)(const char *);
00847     int (*CreateGlobalVariable)(CSOUND *, const char *name, size_t nbytes);
00848     void *(*QueryGlobalVariable)(CSOUND *, const char *name);
00849     void *(*QueryGlobalVariableNoCheck)(CSOUND *, const char *name);
00850     int (*DestroyGlobalVariable)(CSOUND *, const char *name);
00851     int (*CreateConfigurationVariable)(CSOUND *, const char *name,
00852                                        void *p, int type, int flags,
00853                                        void *min, void *max,
00854                                        const char *shortDesc,
00855                                        const char *longDesc);
00856     int (*SetConfigurationVariable)(CSOUND *, const char *name, void *value);
00857     int (*ParseConfigurationVariable)(CSOUND *,
00858                                       const char *name, const char *value);
00859     csCfgVariable_t *(*QueryConfigurationVariable)(CSOUND *, const char *name);
00860     csCfgVariable_t **(*ListConfigurationVariables)(CSOUND *);
00861     int (*DeleteConfigurationVariable)(CSOUND *, const char *name);
00862     const char *(*CfgErrorCodeToString)(int errcode);
00863     int (*GetSizeOfMYFLT)(void);
00864     void **(*GetRtRecordUserData)(CSOUND *);
00865     void **(*GetRtPlayUserData)(CSOUND *);
00866     MYFLT (*GetInverseComplexFFTScale)(CSOUND *, int FFTsize);
00867     MYFLT (*GetInverseRealFFTScale)(CSOUND *, int FFTsize);
00868     void (*ComplexFFT)(CSOUND *, MYFLT *buf, int FFTsize);
00869     void (*InverseComplexFFT)(CSOUND *, MYFLT *buf, int FFTsize);
00870     void (*RealFFT)(CSOUND *, MYFLT *buf, int FFTsize);
00871     void (*InverseRealFFT)(CSOUND *, MYFLT *buf, int FFTsize);
00872     void (*RealFFTMult)(CSOUND *, MYFLT *outbuf, MYFLT *buf1, MYFLT *buf2,
00873                                   int FFTsize, MYFLT scaleFac);
00874     void (*RealFFTnp2)(CSOUND *, MYFLT *buf, int FFTsize);
00875     void (*InverseRealFFTnp2)(CSOUND *, MYFLT *buf, int FFTsize);
00876     int (*AddUtility)(CSOUND *, const char *name,
00877                       int (*UtilFunc)(CSOUND *, int, char **));
00878     int (*RunUtility)(CSOUND *, const char *name, int argc, char **argv);
00879     char **(*ListUtilities)(CSOUND *);
00880     int (*SetUtilityDescription)(CSOUND *, const char *utilName,
00881                                            const char *utilDesc);
00882     const char *(*GetUtilityDescription)(CSOUND *, const char *utilName);
00883     int (*RegisterSenseEventCallback)(CSOUND *, void (*func)(CSOUND *, void *),
00884                                                 void *userData);
00885     int (*RegisterDeinitCallback)(CSOUND *, void *p,
00886                                             int (*func)(CSOUND *, void *));
00887     int (*RegisterResetCallback)(CSOUND *, void *userData,
00888                                            int (*func)(CSOUND *, void *));
00889     void *(*CreateFileHandle)(CSOUND *, void *, int, const char *);
00890     /* Do not use FileOpen in new code; it has been replaced by FileOpen2 */ 
00891     void *(*FileOpen)(CSOUND *,
00892                       void *, int, const char *, void *, const char *);
00893     char *(*GetFileName)(void *);
00894     int (*FileClose)(CSOUND *, void *);
00895     /* PVOC-EX system */
00896     int (*PVOC_CreateFile)(CSOUND *, const char *,
00897                            unsigned long, unsigned long, unsigned long,
00898                            unsigned long, long, int, int,
00899                            float, float *, unsigned long);
00900     int (*PVOC_OpenFile)(CSOUND *, const char *, void *, void *);
00901     int (*PVOC_CloseFile)(CSOUND *, int);
00902     int (*PVOC_PutFrames)(CSOUND *, int, const float *, long);
00903     int (*PVOC_GetFrames)(CSOUND *, int, float *, unsigned long);
00904     int (*PVOC_FrameCount)(CSOUND *, int);
00905     int (*PVOC_fseek)(CSOUND *, int, int);
00906     const char *(*PVOC_ErrorString)(CSOUND *);
00907     int (*PVOCEX_LoadFile)(CSOUND *, const char *, PVOCEX_MEMFILE *);
00908     char *(*GetOpcodeName)(void *p);
00909     int (*GetInputArgCnt)(void *p);
00910     unsigned long (*GetInputArgAMask)(void *p);
00911     unsigned long (*GetInputArgSMask)(void *p);
00912     char *(*GetInputArgName)(void *p, int n);
00913     int (*GetOutputArgCnt)(void *p);
00914     unsigned long (*GetOutputArgAMask)(void *p);
00915     unsigned long (*GetOutputArgSMask)(void *p);
00916     char *(*GetOutputArgName)(void *p, int n);
00917     int (*SetReleaseLength)(void *p, int n);
00918     MYFLT (*SetReleaseLengthSeconds)(void *p, MYFLT n);
00919     int (*GetMidiChannelNumber)(void *p);
00920     MCHNBLK *(*GetMidiChannel)(void *p);
00921     int (*GetMidiNoteNumber)(void *p);
00922     int (*GetMidiVelocity)(void *p);
00923     int (*GetReleaseFlag)(void *p);
00924     double (*GetOffTime)(void *p);
00925     MYFLT *(*GetPFields)(void *p);
00926     int (*GetInstrumentNumber)(void *p);
00927     CS_NORETURN CS_PRINTF2 void (*Die)(CSOUND *, const char *msg, ...);
00928     CS_PRINTF2 int (*InitError)(CSOUND *, const char *msg, ...);
00929     CS_PRINTF2 int (*PerfError)(CSOUND *, const char *msg, ...);
00930     CS_PRINTF2 void (*Warning)(CSOUND *, const char *msg, ...);
00931     CS_PRINTF2 void (*DebugMsg)(CSOUND *, const char *msg, ...);
00932     CS_NORETURN void (*LongJmp)(CSOUND *, int);
00933     CS_PRINTF2 void (*ErrorMsg)(CSOUND *, const char *fmt, ...);
00934     void (*ErrMsgV)(CSOUND *, const char *hdr, const char *fmt, va_list);
00935     int (*GetChannelPtr)(CSOUND *, MYFLT **p, const char *name, int type);
00936     int (*ListChannels)(CSOUND *, CsoundChannelListEntry **lst);
00937     int (*SetControlChannelParams)(CSOUND *, const char *name,
00938                                    int type, MYFLT dflt, MYFLT min, MYFLT max);
00939     int (*GetControlChannelParams)(CSOUND *, const char *name,
00940                                    MYFLT *dflt, MYFLT *min, MYFLT *max);
00941     int (*ChanIKSet)(CSOUND *, MYFLT value, int n);
00942     int (*ChanOKGet)(CSOUND *, MYFLT *value, int n);
00943     int (*ChanIASet)(CSOUND *, const MYFLT *value, int n);
00944     int (*ChanOAGet)(CSOUND *, MYFLT *value, int n);
00945     void (*dispinit)(CSOUND *);
00946     void *(*Create_Mutex)(int isRecursive);
00947     int (*LockMutexNoWait)(void *mutex_);
00948     void (*LockMutex)(void *mutex_);
00949     void (*UnlockMutex)(void *mutex_);
00950     void (*DestroyMutex)(void *mutex_);
00951     long (*RunCommand)(const char * const *argv, int noWait);
00952     void *(*GetCurrentThreadID)(void);
00953     void (*SetChannelIOCallback)(CSOUND *, CsoundChannelIOCallback_t func);
00954     int (*Set_Callback)(CSOUND *, int (*func)(void *, void *, unsigned int),
00955                                   void *userData, unsigned int typeMask);
00956     void (*Remove_Callback)(CSOUND *,
00957                             int (*func)(void *, void *, unsigned int));
00958     int (*PvsinSet)(CSOUND *, const PVSDATEXT *value, int n);
00959     int (*PvsoutGet)(CSOUND *, PVSDATEXT *value, int n);
00960     void (*SetInternalYieldCallback)(CSOUND *,
00961                        int (*yieldCallback)(CSOUND *));
00962     void *(*CreateBarrier)(unsigned int max);
00963     int (*DestroyBarrier)(void *);
00964     int (*WaitBarrier)(void *);
00965     void *(*FileOpen2)(CSOUND *, void *, int, const char *, void *, 
00966                       const char *, int, int);
00967     int (*type2csfiletype)(int type, int encoding);
00968     MEMFIL *(*ldmemfile2)(CSOUND *, const char *, int);
00969     void (*NotifyFileOpened)(CSOUND*, const char*, int, int, int);
00970     int (*sftype2csfiletype)(int type);
00971  /* SUBR dummyfn_1; */
00972     SUBR dummyfn_2[88];
00973     void          *flgraphGlobals;
00974     char          *delayederrormessages;
00975     void          *printerrormessagesflag;
00976     /* ----------------------- public data fields ----------------------- */
00978     OPDS          *ids, *pds;
00979     int           ksmps, global_ksmps, nchnls, spoutactive;
00980     long          kcounter, global_kcounter;
00981     int           reinitflag;
00982     int           tieflag;
00983     MYFLT         esr, onedsr, sicvt;
00984     MYFLT         tpidsr, pidsr, mpidsr, mtpdsr;
00985     MYFLT         onedksmps;
00986     MYFLT         ekr, global_ekr;
00987     MYFLT         onedkr;
00988     MYFLT         kicvt;
00989     MYFLT         e0dbfs, dbfs_to_float;
00991     double        timeOffs, beatOffs;
00993     double        curTime, curTime_inc;
00995     double        curBeat, curBeat_inc;
00997     double        beatTime;
00999     int           dummy_01, dummy_02;
01000     /* Widgets */
01001     void          *widgetGlobals;
01003     void          *stdOp_Env;
01004     MYFLT         *zkstart;
01005     MYFLT         *zastart;
01006     long          zklast;
01007     long          zalast;
01008     MYFLT         *spin;
01009     MYFLT         *spout;
01010     int           nspin;
01011     int           nspout;
01012     OPARMS        *oparms;
01013     EVTBLK        *currevent;
01014     INSDS         *curip;
01015     void          *hostdata;
01016     void          *rtRecord_userdata;
01017     void          *rtPlay_userdata;
01018     char          *orchname, *scorename;
01019     int           holdrand;
01021     int           strVarMaxLen;
01022     int           maxinsno;
01023     int           strsmax;
01024     char          **strsets;
01025     INSTRTXT      **instrtxtp;
01027     MCHNBLK       *m_chnbp[64];
01028     RTCLOCK       *csRtClock;
01029     CsoundRandMTState *csRandState;
01030     int           randSeed1;
01031     int           randSeed2;
01032     /* ------- private data (not to be used by hosts or externals) ------- */
01033 #ifdef __BUILDING_LIBCSOUND
01034     /* callback function pointers */
01035     SUBR          first_callback_;
01036     void          (*InputValueCallback_)(CSOUND *,
01037                                          const char *channelName, MYFLT *value);
01038     void          (*OutputValueCallback_)(CSOUND *,
01039                                           const char *channelName, MYFLT value);
01040     void          (*csoundMessageCallback_)(CSOUND *, int attr,
01041                                             const char *format, va_list args);
01042     int           (*csoundConfigureCallback_)(CSOUND *);
01043     void          (*csoundMakeGraphCallback_)(CSOUND *, WINDAT *windat,
01044                                                         const char *name);
01045     void          (*csoundDrawGraphCallback_)(CSOUND *, WINDAT *windat);
01046     void          (*csoundKillGraphCallback_)(CSOUND *, WINDAT *windat);
01047     int           (*csoundExitGraphCallback_)(CSOUND *);
01048     int           (*csoundYieldCallback_)(CSOUND *);
01049     void          (*csoundMakeXYinCallback_)(CSOUND *, XYINDAT *, MYFLT, MYFLT);
01050     void          (*csoundReadXYinCallback_)(CSOUND *, XYINDAT *);
01051     void          (*csoundKillXYinCallback_)(CSOUND *, XYINDAT *);
01052     void          (*cscoreCallback_)(CSOUND *);
01053     void          (*FileOpenCallback_)(CSOUND*, const char*, int, int, int);
01054     SUBR          last_callback_;
01055     /* these are not saved on RESET */
01056     int           (*playopen_callback)(CSOUND *, const csRtAudioParams *parm);
01057     void          (*rtplay_callback)(CSOUND *, const MYFLT *outBuf, int nbytes);
01058     int           (*recopen_callback)(CSOUND *, const csRtAudioParams *parm);
01059     int           (*rtrecord_callback)(CSOUND *, MYFLT *inBuf, int nbytes);
01060     void          (*rtclose_callback)(CSOUND *);
01061     /* end of callbacks */
01062     int           nchanik, nchania, nchanok, nchanoa;
01063     MYFLT         *chanik, *chania, *chanok, *chanoa;
01064     MYFLT         cpu_power_busy;
01065     char          *xfilename;
01066     /* oload.h */
01067     short         nlabels;
01068     short         ngotos;
01069     int           peakchunks;
01070     int           keep_tmp;
01071     int           dither_output;
01072     OENTRY        *opcodlst;
01073     int           *opcode_list;
01074     OENTRY        *oplstend;
01075     int           maxopcno;
01076     long          nrecs;
01077     FILE*         Linepipe;
01078     int           Linefd;
01079     void          *csoundCallbacks_;
01080     FILE*         scfp;
01081     FILE*         oscfp;
01082     MYFLT         maxamp[MAXCHNLS];
01083     MYFLT         smaxamp[MAXCHNLS];
01084     MYFLT         omaxamp[MAXCHNLS];
01085     unsigned long maxpos[MAXCHNLS], smaxpos[MAXCHNLS], omaxpos[MAXCHNLS];
01086     FILE*         scorein;
01087     FILE*         scoreout;
01088     MYFLT         *pool;
01089     int           *argoffspace;
01090     INSDS         *frstoff;
01091     jmp_buf       exitjmp;
01092     SRTBLK        *frstbp;
01093     int           sectcnt;
01094     int           inerrcnt, synterrcnt, perferrcnt;
01095     INSTRTXT      instxtanchor;
01096     INSDS         actanchor;
01097     long          rngcnt[MAXCHNLS];
01098     short         rngflg, multichan;
01099     void          *evtFuncChain;
01100     EVTNODE       *OrcTrigEvts;             /* List of events to be started */
01101     EVTNODE       *freeEvtNodes;
01102     int           csoundIsScorePending_;
01103     int           advanceCnt;
01104     int           initonly;
01105     int           evt_poll_cnt;
01106     int           evt_poll_maxcnt;
01107     int           Mforcdecs, Mxtroffs, MTrkend;
01108     MYFLT         tran_sr, tran_kr, tran_ksmps;
01109     MYFLT         tran_0dbfs;
01110     int           tran_nchnls;
01111     OPCODINFO     *opcodeInfo;
01112     void          *instrumentNames;
01113     void          *strsav_str;
01114     void          *strsav_space;
01115     FUNC**        flist;
01116     int           maxfnum;
01117     GEN           *gensub;
01118     int           genmax;
01119     int           ftldno;
01120     void          **namedGlobals;
01121     int           namedGlobalsCurrLimit;
01122     int           namedGlobalsMaxLimit;
01123     void          **cfgVariableDB;
01124     double        prvbt, curbt, nxtbt;
01125     double        curp2, nxtim;
01126     int           cyclesRemaining;
01127     EVTBLK        evt;
01128     void          *memalloc_db;
01129     MGLOBAL       *midiGlobals;
01130     void          *envVarDB;
01131     MEMFIL        *memfiles;
01132     PVOCEX_MEMFILE *pvx_memfiles;
01133     int           FFT_max_size;
01134     void          *FFT_table_1;
01135     void          *FFT_table_2;
01136     /* statics from twarp.c should be TSEG* */
01137     void          *tseg, *tpsave, *tplim;
01138     /* Statics from express.c */
01139     long          polmax;
01140     long          toklen;
01141     char          *tokenstring;
01142     POLISH        *polish;
01143     TOKEN         *token;
01144     TOKEN         *tokend;
01145     TOKEN         *tokens;
01146     TOKEN         **tokenlist;
01147     int           toklength;
01148     int           acount, kcount, icount, Bcount, bcount;
01149     char          *stringend;
01150     TOKEN         **revp, **pushp, **argp, **endlist;
01151     char          *assign_outarg;
01152     int           argcnt_offs, opcode_is_assign, assign_type;
01153     int           strVarSamples;    /* number of MYFLT locations for string */
01154     MYFLT         *gbloffbas;       /* was static in oload.c */
01155     void          *otranGlobals;
01156     void          *rdorchGlobals;
01157     void          *sreadGlobals;
01158     void          *extractGlobals;
01159     void          *oneFileGlobals;
01160     void          *lineventGlobals;
01161     void          *musmonGlobals;
01162     void          *libsndGlobals;
01163     void          (*spinrecv)(CSOUND *);
01164     void          (*spoutran)(CSOUND *);
01165     int           (*audrecv)(CSOUND *, MYFLT *, int);
01166     void          (*audtran)(CSOUND *, const MYFLT *, int);
01167     int           warped;               /* rdscor.c */
01168     int           sstrlen;
01169     char          *sstrbuf;
01170     int           enableMsgAttr;        /* csound.c */
01171     int           sampsNeeded;
01172     MYFLT         csoundScoreOffsetSeconds_;
01173     int           inChar_;
01174     int           isGraphable_;
01175     int           delayr_stack_depth;   /* ugens6.c */
01176     void          *first_delayr;
01177     void          *last_delayr;
01178     long          revlpsiz[6];
01179     long          revlpsum;
01180     double        rndfrac;              /* aops.c */
01181     MYFLT         *logbase2;
01182     NAMES         *omacros, *smacros;
01183     void          *namedgen;            /* fgens.c */
01184     void          *open_files;          /* fileopen.c */
01185     void          *searchPathCache;
01186     void          *sndmemfiles;
01187     void          *reset_list;
01188     void          *pvFileTable;         /* pvfileio.c */
01189     int           pvNumFiles;
01190     int           pvErrorCode;
01191     /* database for deferred loading of opcode plugin libraries */
01192     void          *pluginOpcodeFiles, *pluginOpcodeDB;
01193     int           enableHostImplementedAudioIO;
01194     int           hostRequestedBufferSize;
01195     /* engineState is sum of:
01196      *   1 (CS_STATE_PRE):  csoundPreCompile was called
01197      *   2 (CS_STATE_COMP): csoundCompile was called
01198      *   4 (CS_STATE_UTIL): csoundRunUtility was called
01199      *   8 (CS_STATE_CLN):  csoundCleanup needs to be called
01200      *  16 (CS_STATE_JMP):  csoundLongJmp was called
01201      */
01202     int           engineState;
01203     int           stdin_assign_flg;
01204     int           stdout_assign_flg;
01205     int           orcname_mode;         /* 0: normal, 1: ignore, 2: fail */
01206     void          *csmodule_db;
01207     char          *dl_opcodes_oplibs;
01208     char          *SF_csd_licence;
01209     char          *SF_id_title;
01210     char          *SF_id_copyright;
01211     char          *SF_id_software;
01212     char          *SF_id_artist;
01213     char          *SF_id_comment;
01214     char          *SF_id_date;
01215     void          *utility_db;
01216     short         *isintab;             /* ugens3.c */
01217     void          *lprdaddr;            /* ugens5.c */
01218     int           currentLPCSlot;
01219     int           max_lpc_slot;
01220     void          *chn_db;
01221     int           opcodedirWasOK;
01222     int           disable_csd_options;
01223     CsoundRandMTState randState_;
01224     int           performState;
01225     int           ugens4_rand_16;
01226     int           ugens4_rand_15;
01227     void          *schedule_kicked;
01228     LBLBLK        **lopds;
01229     void          *larg;        /* this is actually LARGNO* */
01230     MYFLT         *disprep_fftcoefs;
01231     void          *winEPS_globals;
01232     OPARMS        oparms_;
01233     long          instxtcount, optxtsize;
01234     long          poolcount, gblfixed, gblacount, gblscount;
01235     CsoundChannelIOCallback_t   channelIOCallback_;
01236     int           (*doCsoundCallback)(CSOUND *, void *, unsigned int);
01237     const unsigned char *strhash_tabl_8;
01238     unsigned int  (*strHash32)(const char *s);
01239     REMOT_BUF     SVrecvbuf;  /* RM: rt_evt input Communications buffer */
01240     void          *remoteGlobals;
01241     /* VL: pvs bus */
01242     int            nchanif, nchanof;
01243     char           *chanif, *chanof;
01244     /* VL: internal yield callback */
01245     int           (*csoundInternalYieldCallback_)(CSOUND *);
01246     void          *multiThreadedBarrier1;
01247     void          *multiThreadedBarrier2;
01248     int           multiThreadedComplete;
01249     THREADINFO    *multiThreadedThreadInfo;
01250     INSDS         *multiThreadedStart;
01251     INSDS         *multiThreadedEnd;
01252     uint32_t      tempStatus;    /* keeps track of which files are temps */
01253     int           orcLineOffset; /* 1 less than 1st orch line in the CSD */
01254     int           scoLineOffset; /* 1 less than 1st score line in the CSD */
01255     char*         csdname;       /* original CSD name; do not free() */
01256 #endif  /* __BUILDING_LIBCSOUND */
01257   };
01258 
01259 /*
01260  * Move the C++ guards to enclose the entire file,
01261  * in order to enable C++ to #include this file.
01262  */
01263 
01264 #ifdef __cplusplus
01265 }
01266 #endif
01267 
01268 #endif  /* CSOUNDCORE_H */
01269 

Generated on Tue Apr 14 11:00:49 2009 for Csound and CsoundAC by  doxygen 1.5.8