csound.h

Go to the documentation of this file.
00001 /*
00002  * C S O U N D
00003  *
00004  * An auto-extensible system for making music on computers
00005  * by means of software alone.
00006  *
00007  * Copyright (C) 2001-2005 Michael Gogins, Matt Ingalls, John D. Ramsdell,
00008  *                         John P. ffitch, Istvan Varga, Victor Lazzarini
00009  *
00010  * L I C E N S E
00011  *
00012  * This software is free software; you can redistribute it and/or
00013  * modify it under the terms of the GNU Lesser General Public
00014  * License as published by the Free Software Foundation; either
00015  * version 2.1 of the License, or (at your option) any later version.
00016  *
00017  * This software is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020  * Lesser General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU Lesser General Public
00023  * License along with this software; if not, write to the Free Software
00024  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025  */
00026 
00027 #ifndef CSOUND_H
00028 #define CSOUND_H
00029 
00102   /*
00103    * Platform-dependent definitions and declarations.
00104    */
00105 
00106 #if (defined(WIN32) || defined(_WIN32)) && !defined(SWIG)
00107 #  define PUBLIC        __declspec(dllexport)
00108 #elif defined(__GNUC__)
00109 #  define PUBLIC        __attribute__ ( (visibility("default")) )
00110 #else
00111 #  define PUBLIC
00112 #endif
00113 
00118 #ifdef SWIG
00119 #define CS_PRINTF2
00120 #define CS_PRINTF3
00121 #ifndef __MYFLT_DEF
00122 #define __MYFLT_DEF
00123 #ifndef USE_DOUBLE
00124 #define MYFLT float
00125 #else
00126 #define MYFLT double
00127 #endif
00128 #endif
00129 %module csnd
00130 %{
00131 #  include "sysdep.h"
00132 #  include "text.h"
00133 #  include <stdarg.h>
00134 %}
00135 #else
00136 #  include "sysdep.h"
00137 #  include "text.h"
00138 #  include <stdarg.h>
00139 #endif
00140 
00141 #ifdef __cplusplus
00142 extern "C" {
00143 #endif
00144 
00149   typedef enum
00150     {
00151       /* Completed successfully. */
00152       CSOUND_SUCCESS = 0,
00153       /* Unspecified failure. */
00154       CSOUND_ERROR = -1,
00155       /* Failed during initialization. */
00156       CSOUND_INITIALIZATION = -2,
00157       /* Failed during performance. */
00158       CSOUND_PERFORMANCE = -3,
00159       /* Failed to allocate requested memory. */
00160       CSOUND_MEMORY = -4,
00161       /* Termination requested by SIGINT or SIGTERM. */
00162       CSOUND_SIGNAL = -5
00163     }
00164   CSOUND_STATUS;
00165 
00166   /* Compilation or performance aborted, but not as a result of an error
00167      (e.g. --help, or running an utility with -U). */
00168 #define CSOUND_EXITJMP_SUCCESS  (256)
00169 
00173 #define CSOUNDINIT_NO_SIGNAL_HANDLER  1
00174 #define CSOUNDINIT_NO_ATEXIT          2
00175 
00179 #define CSOUND_CONTROL_CHANNEL      1
00180 #define CSOUND_AUDIO_CHANNEL        2
00181 #define CSOUND_STRING_CHANNEL       3
00182 
00183 #define CSOUND_CHANNEL_TYPE_MASK    15
00184 
00185 #define CSOUND_INPUT_CHANNEL        16
00186 #define CSOUND_OUTPUT_CHANNEL       32
00187 
00188 #define CSOUND_CONTROL_CHANNEL_INT  1
00189 #define CSOUND_CONTROL_CHANNEL_LIN  2
00190 #define CSOUND_CONTROL_CHANNEL_EXP  3
00191 
00192 #define CSOUND_CALLBACK_KBD_EVENT   (0x00000001U)
00193 #define CSOUND_CALLBACK_KBD_TEXT    (0x00000002U)
00194 
00203 typedef enum
00204 {
00205     CSFTYPE_UNIFIED_CSD = 1,   /* Unified Csound document */
00206     CSFTYPE_ORCHESTRA = 2,     /* the primary orc file (may be temporary) */
00207     CSFTYPE_SCORE = 3,         /* the primary sco file (may be temporary)
00208                                   or any additional score opened by Cscore */
00209     CSFTYPE_ORC_INCLUDE = 4,   /* a file #included by the orchestra */
00210     CSFTYPE_SCO_INCLUDE = 5,   /* a file #included by the score */
00211     CSFTYPE_SCORE_OUT = 6,     /* used for score.srt, score.xtr, cscore.out */
00212     CSFTYPE_SCOT = 7,          /* Scot score input format */
00213     CSFTYPE_OPTIONS = 8,       /* for .csoundrc and -@ flag */
00214     CSFTYPE_EXTRACT_PARMS = 9, /* extraction file specified by -x */
00215 
00216     /* audio file types that Csound can write (10-19) or read */
00217     CSFTYPE_RAW_AUDIO = 10,
00218     CSFTYPE_IRCAM = 11,
00219     CSFTYPE_AIFF = 12,
00220     CSFTYPE_AIFC = 13,
00221     CSFTYPE_WAVE = 14,
00222     CSFTYPE_AU = 15,
00223     CSFTYPE_SD2 = 16,
00224     CSFTYPE_W64 = 17,
00225     CSFTYPE_WAVEX = 18,
00226     CSFTYPE_FLAC = 19,
00227     CSFTYPE_CAF = 20,
00228     CSFTYPE_AVR = 21,
00229     CSFTYPE_HTK = 22,
00230     CSFTYPE_MAT4 = 23,
00231     CSFTYPE_MAT5 = 24,
00232     CSFTYPE_NIST = 25,
00233     CSFTYPE_PAF = 26,
00234     CSFTYPE_PVF = 27,
00235     CSFTYPE_SDS = 28,
00236     CSFTYPE_SVX = 29,
00237     CSFTYPE_VOC = 30,
00238     CSFTYPE_XI = 31,
00239     CSFTYPE_UNKNOWN_AUDIO = 32, /* used when opening audio file for reading
00240                                    or temp file written with <CsSampleB> */
00241 
00242     /* miscellaneous music formats */
00243     CSFTYPE_SOUNDFONT = 33,
00244     CSFTYPE_STD_MIDI = 34,     /* Standard MIDI file */
00245     CSFTYPE_MIDI_SYSEX = 35,   /* Raw MIDI codes, eg. SysEx dump */
00246 
00247     /* analysis formats */
00248     CSFTYPE_HETRO = 36,
00249     CSFTYPE_PVC = 37,          /* original PVOC format */
00250     CSFTYPE_PVCEX = 38,        /* PVOC-EX format */
00251     CSFTYPE_CVANAL = 39,
00252     CSFTYPE_LPC = 40,
00253     CSFTYPE_ATS = 41,
00254     CSFTYPE_LORIS = 42,
00255     CSFTYPE_SDIF = 43,
00256     CSFTYPE_HRTF = 44,
00257 
00258     /* Types for plugins and the files they read/write */
00259     CSFTYPE_VST_PLUGIN = 45,
00260     CSFTYPE_LADSPA_PLUGIN = 46,
00261     CSFTYPE_SNAPSHOT = 47,
00262 
00263     /* Special formats for Csound ftables or scanned synthesis
00264        matrices with header info */
00265     CSFTYPE_FTABLES_TEXT = 48,   /* for ftsave and ftload  */
00266     CSFTYPE_FTABLES_BINARY = 49, /* for ftsave and ftload  */
00267     CSFTYPE_XSCANU_MATRIX = 50,  /* for xscanu opcode  */
00268 
00269     /* These are for raw lists of numbers without header info */
00270     CSFTYPE_FLOATS_TEXT = 51,    /* used by GEN23, GEN28, dumpk, readk */
00271     CSFTYPE_FLOATS_BINARY = 52,  /* used by dumpk, readk, etc. */
00272     CSFTYPE_INTEGER_TEXT = 53,   /* used by dumpk, readk, etc. */
00273     CSFTYPE_INTEGER_BINARY = 54, /* used by dumpk, readk, etc. */
00274 
00275     /* image file formats */
00276     CSFTYPE_IMAGE_PNG = 59,
00277 
00278     /* For files that don't match any of the above */
00279     CSFTYPE_POSTSCRIPT = 55,     /* EPS format used by graphs */
00280     CSFTYPE_SCRIPT_TEXT = 56,    /* executable script files (eg. Python) */
00281     CSFTYPE_OTHER_TEXT = 57,
00282     CSFTYPE_OTHER_BINARY = 58,
00283 
00284     /* This should only be used internally by the original FileOpen()
00285        API call or for temp files written with <CsFileB> */
00286     CSFTYPE_UNKNOWN = 0
00287 }
00288 CSOUND_FILETYPES;
00289 
00290   /*
00291    * TYPE DEFINITIONS
00292    */
00293 
00294   /*
00295    * Forward declarations.
00296    */
00297 
00298   typedef struct CSOUND_  CSOUND;
00299 
00300   typedef struct windat_  WINDAT;
00301   typedef struct xyindat_ XYINDAT;
00302 
00306   typedef struct {
00308     char    *devName;
00310     int     devNum;
00312     int     bufSamp_SW;
00314     int     bufSamp_HW;
00316     int     nChannels;
00318     int     sampleFormat;
00320     float   sampleRate;
00321   } csRtAudioParams;
00322 
00323   typedef struct RTCLOCK_S {
00324     int_least64_t   starttime_real;
00325     int_least64_t   starttime_CPU;
00326   } RTCLOCK;
00327 
00328   typedef struct {
00329     char        *opname;
00330     char        *outypes;
00331     char        *intypes;
00332   } opcodeListEntry;
00333 
00334   typedef struct CsoundRandMTState_ {
00335     int         mti;
00336     uint32_t    mt[624];
00337   } CsoundRandMTState;
00338 
00339   typedef struct CsoundChannelListEntry_ {
00340     const char  *name;
00341     int         type;
00342   } CsoundChannelListEntry;
00343 
00344   /* PVSDATEX is a variation on PVSDAT used in
00345      the pvs bus interface */
00346   typedef struct pvsdat_ext {
00347         long            N;
00348 #ifdef SDFT
00349         int             sliding; /* Flag to indicate sliding case */
00350         long            NB;
00351 #endif
00352         long            overlap;
00353         long            winsize;
00354         int             wintype;
00355         long            format;
00356         unsigned long   framecount;
00357         float*           frame;
00358  } PVSDATEXT;
00359 
00360 
00361   typedef void (*CsoundChannelIOCallback_t)(CSOUND *csound,
00362                                             const char *channelName,
00363                                             MYFLT *channelValuePtr,
00364                                             int channelType);
00365 #ifndef CSOUND_CSDL_H
00366 
00367 /* This pragma must come before all public function declarations */
00368 #if (defined(macintosh) && defined(__MWERKS__))
00369 #  pragma export on
00370 #endif
00371 
00372   /*
00373    * INSTANTIATION
00374    */
00375 
00382   PUBLIC int csoundInitialize(int *argc, char ***argv, int flags);
00383 
00391   PUBLIC CSOUND *csoundCreate(void *hostData);
00392 
00398   PUBLIC int csoundPreCompile(CSOUND *);
00399 
00412   PUBLIC int csoundInitializeCscore(CSOUND *, FILE *insco, FILE *outsco);
00413 
00419   PUBLIC int csoundQueryInterface(const char *name, void **iface, int *version);
00420 
00424   PUBLIC void csoundDestroy(CSOUND *);
00425 
00429   PUBLIC int csoundGetVersion(void);
00430 
00434   PUBLIC int csoundGetAPIVersion(void);
00435 
00439   PUBLIC void *csoundGetHostData(CSOUND *);
00440 
00444   PUBLIC void csoundSetHostData(CSOUND *, void *hostData);
00445 
00454   PUBLIC const char *csoundGetEnv(CSOUND *csound, const char *name);
00455 
00463   PUBLIC int csoundSetGlobalEnv(const char *name, const char *value);
00464 
00465   /*
00466    * PERFORMANCE
00467    */
00468 
00481   PUBLIC int csoundCompile(CSOUND *, int argc, char **argv);
00482 
00493   PUBLIC int csoundPerform(CSOUND *);
00494 
00504   PUBLIC int csoundPerformKsmps(CSOUND *);
00505 
00514   PUBLIC int csoundPerformKsmpsAbsolute(CSOUND *);
00515 
00525   PUBLIC int csoundPerformBuffer(CSOUND *);
00526 
00532   PUBLIC void csoundStop(CSOUND *);
00533 
00540   PUBLIC int csoundCleanup(CSOUND *);
00541 
00547   PUBLIC void csoundReset(CSOUND *);
00548 
00549   /*
00550    * ATTRIBUTES
00551    */
00552 
00556   PUBLIC MYFLT csoundGetSr(CSOUND *);
00557 
00561   PUBLIC MYFLT csoundGetKr(CSOUND *);
00562 
00566   PUBLIC int csoundGetKsmps(CSOUND *);
00567 
00571   PUBLIC int csoundGetNchnls(CSOUND *);
00572 
00576   PUBLIC MYFLT csoundGet0dBFS(CSOUND *);
00577 
00583   PUBLIC int csoundGetStrVarMaxLen(CSOUND *);
00584 
00588   PUBLIC int csoundGetSampleFormat(CSOUND *);
00589 
00593   PUBLIC int csoundGetSampleSize(CSOUND *);
00594 
00598   PUBLIC long csoundGetInputBufferSize(CSOUND *);
00599 
00603   PUBLIC long csoundGetOutputBufferSize(CSOUND *);
00604 
00610   PUBLIC MYFLT *csoundGetInputBuffer(CSOUND *);
00611 
00617   PUBLIC MYFLT *csoundGetOutputBuffer(CSOUND *);
00618 
00624   PUBLIC MYFLT *csoundGetSpin(CSOUND *);
00625 
00631   PUBLIC MYFLT *csoundGetSpout(CSOUND *);
00632 
00636   PUBLIC const char *csoundGetOutputFileName(CSOUND *);
00637 
00647   PUBLIC void csoundSetHostImplementedAudioIO(CSOUND *, int state, int bufSize);
00648 
00653   PUBLIC double csoundGetScoreTime(CSOUND *);
00654 
00655   /*
00656    * SCORE HANDLING
00657    */
00658 
00663   PUBLIC int csoundIsScorePending(CSOUND *);
00664 
00673   PUBLIC void csoundSetScorePending(CSOUND *, int pending);
00674 
00679   PUBLIC MYFLT csoundGetScoreOffsetSeconds(CSOUND *);
00680 
00690   PUBLIC void csoundSetScoreOffsetSeconds(CSOUND *, MYFLT time);
00691 
00696   PUBLIC void csoundRewindScore(CSOUND *);
00697 
00703   PUBLIC void csoundSetCscoreCallback(CSOUND *,
00704                                       void (*cscoreCallback_)(CSOUND *));
00705 
00712   PUBLIC int csoundScoreSort(CSOUND *, FILE *inFile, FILE *outFile);
00713 
00721   PUBLIC int csoundScoreExtract(CSOUND *,
00722                                 FILE *inFile, FILE *outFile, FILE *extractFile);
00723 
00724   /*
00725    * MESSAGES & TEXT
00726    */
00727 
00731   PUBLIC CS_PRINTF2 void csoundMessage(CSOUND *, const char *format, ...);
00732 
00738   PUBLIC CS_PRINTF3 void csoundMessageS(CSOUND *,
00739                                         int attr, const char *format, ...);
00740 
00741   PUBLIC void csoundMessageV(CSOUND *,
00742                              int attr, const char *format, va_list args);
00743 
00747   PUBLIC void csoundSetMessageCallback(CSOUND *,
00748                             void (*csoundMessageCallback_)(CSOUND *,
00749                                                            int attr,
00750                                                            const char *format,
00751                                                            va_list valist));
00752 
00756   PUBLIC int csoundGetMessageLevel(CSOUND *);
00757 
00761   PUBLIC void csoundSetMessageLevel(CSOUND *, int messageLevel);
00762 
00767   PUBLIC void csoundInputMessage(CSOUND *, const char *message);
00768 
00774   PUBLIC void csoundKeyPress(CSOUND *, char c);
00775 
00776   /*
00777    * CONTROL AND EVENTS
00778    */
00779 
00795   PUBLIC void csoundSetInputValueCallback(CSOUND *,
00796                             void (*inputValueCalback_)(CSOUND *,
00797                                                        const char *channelName,
00798                                                        MYFLT *value));
00799 
00809   PUBLIC void csoundSetOutputValueCallback(CSOUND *,
00810                             void (*outputValueCalback_)(CSOUND *,
00811                                                         const char *channelName,
00812                                                         MYFLT value));
00813 
00821   PUBLIC int csoundScoreEvent(CSOUND *,
00822                               char type, const MYFLT *pFields, long numFields);
00823 
00824   /*
00825    * MIDI
00826    */
00827 
00831   PUBLIC void csoundSetExternalMidiInOpenCallback(CSOUND *,
00832             int (*func)(CSOUND *, void **userData, const char *devName));
00833 
00837   PUBLIC void csoundSetExternalMidiReadCallback(CSOUND *,
00838             int (*func)(CSOUND *, void *userData,
00839                                   unsigned char *buf, int nBytes));
00840 
00844   PUBLIC void csoundSetExternalMidiInCloseCallback(CSOUND *,
00845             int (*func)(CSOUND *, void *userData));
00846 
00850   PUBLIC void csoundSetExternalMidiOutOpenCallback(CSOUND *,
00851             int (*func)(CSOUND *, void **userData, const char *devName));
00852 
00856   PUBLIC void csoundSetExternalMidiWriteCallback(CSOUND *,
00857             int (*func)(CSOUND *, void *userData,
00858                                   const unsigned char *buf, int nBytes));
00859 
00863   PUBLIC void csoundSetExternalMidiOutCloseCallback(CSOUND *,
00864             int (*func)(CSOUND *, void *userData));
00865 
00869   PUBLIC void csoundSetExternalMidiErrorStringCallback(CSOUND *,
00870             const char *(*func)(int));
00871 
00872   /*
00873    * FUNCTION TABLE DISPLAY
00874    */
00875 
00880   PUBLIC int csoundSetIsGraphable(CSOUND *, int isGraphable);
00881 
00885   PUBLIC void csoundSetMakeGraphCallback(CSOUND *,
00886                             void (*makeGraphCallback_)(CSOUND *,
00887                                                        WINDAT *windat,
00888                                                        const char *name));
00889 
00893   PUBLIC void csoundSetDrawGraphCallback(CSOUND *,
00894                             void (*drawGraphCallback_)(CSOUND *,
00895                                                        WINDAT *windat));
00896 
00900   PUBLIC void csoundSetKillGraphCallback(CSOUND *,
00901                             void (*killGraphCallback_)(CSOUND *,
00902                                                        WINDAT *windat));
00903 
00907   PUBLIC void csoundSetMakeXYinCallback(CSOUND *,
00908                             void (*makeXYinCallback_)(CSOUND *, XYINDAT *,
00909                                                       MYFLT x, MYFLT y));
00910 
00914   PUBLIC void csoundSetReadXYinCallback(CSOUND *,
00915                             void (*readXYinCallback_)(CSOUND *, XYINDAT *));
00916 
00920   PUBLIC void csoundSetKillXYinCallback(CSOUND *,
00921                             void (*killXYinCallback_)(CSOUND *, XYINDAT *));
00922 
00926   PUBLIC void csoundSetExitGraphCallback(CSOUND *,
00927                             int (*exitGraphCallback_)(CSOUND *));
00928 
00929   /*
00930    * OPCODES
00931    */
00932 
00939   PUBLIC int csoundNewOpcodeList(CSOUND *, opcodeListEntry **opcodelist);
00940 
00944   PUBLIC void csoundDisposeOpcodeList(CSOUND *, opcodeListEntry *opcodelist);
00945 
00953   PUBLIC int csoundAppendOpcode(CSOUND *, const char *opname,
00954                                 int dsblksiz, int thread,
00955                                 const char *outypes, const char *intypes,
00956                                 int (*iopadr)(CSOUND *, void *),
00957                                 int (*kopadr)(CSOUND *, void *),
00958                                 int (*aopadr)(CSOUND *, void *));
00959 
00960   /*
00961    * MISCELLANEOUS FUNCTIONS
00962    */
00963 
00967   PUBLIC int csoundOpenLibrary(void **library, const char *libraryPath);
00968 
00972   PUBLIC int csoundCloseLibrary(void *library);
00973 
00977   PUBLIC void *csoundGetLibrarySymbol(void *library, const char *symbolName);
00978 
00988   PUBLIC void csoundSetYieldCallback(CSOUND *, int (*yieldCallback_)(CSOUND *));
00989 
00990   /*
00991    * REAL-TIME AUDIO PLAY AND RECORD
00992    */
00993 
00998   PUBLIC void csoundSetPlayopenCallback(CSOUND *,
00999                             int (*playopen__)(CSOUND *,
01000                                               const csRtAudioParams *parm));
01001 
01006   PUBLIC void csoundSetRtplayCallback(CSOUND *,
01007                             void (*rtplay__)(CSOUND *,
01008                                              const MYFLT *outBuf, int nbytes));
01009 
01014   PUBLIC void csoundSetRecopenCallback(CSOUND *,
01015                             int (*recopen_)(CSOUND *,
01016                                             const csRtAudioParams *parm));
01017 
01022   PUBLIC void csoundSetRtrecordCallback(CSOUND *,
01023                             int (*rtrecord__)(CSOUND *,
01024                                               MYFLT *inBuf, int nbytes));
01025 
01030   PUBLIC void csoundSetRtcloseCallback(CSOUND *, void (*rtclose__)(CSOUND *));
01031 
01035   PUBLIC int csoundGetDebug(CSOUND *);
01036 
01040   PUBLIC void csoundSetDebug(CSOUND *, int debug);
01041 
01046   PUBLIC int csoundTableLength(CSOUND *, int table);
01047 
01052   PUBLIC MYFLT csoundTableGet(CSOUND *, int table, int index);
01053 
01058   PUBLIC void csoundTableSet(CSOUND *, int table, int index, MYFLT value);
01059 
01066   PUBLIC int csoundGetTable(CSOUND *, MYFLT **tablePtr, int tableNum);
01067 
01074   PUBLIC void *csoundCreateThread(uintptr_t (*threadRoutine)(void *),
01075                                   void *userdata);
01076 
01081   PUBLIC void *csoundGetCurrentThreadId(void);
01082 
01087   PUBLIC uintptr_t csoundJoinThread(void *thread);
01088 
01101   PUBLIC long csoundRunCommand(const char * const *argv, int noWait);
01102 
01107   PUBLIC void *csoundCreateThreadLock(void);
01108 
01117   PUBLIC int csoundWaitThreadLock(void *lock, size_t milliseconds);
01118 
01124   PUBLIC void csoundWaitThreadLockNoTimeout(void *lock);
01125 
01129   PUBLIC void csoundNotifyThreadLock(void *lock);
01130 
01134   PUBLIC void csoundDestroyThreadLock(void *lock);
01135 
01149   PUBLIC void *csoundCreateMutex(int isRecursive);
01150 
01156   PUBLIC void csoundLockMutex(void *mutex_);
01157 
01165   PUBLIC int csoundLockMutexNoWait(void *mutex_);
01166 
01173   PUBLIC void csoundUnlockMutex(void *mutex_);
01174 
01179   PUBLIC void csoundDestroyMutex(void *mutex_);
01180 
01181 
01187   PUBLIC void *csoundCreateBarrier(unsigned int max);
01188 
01192   PUBLIC int csoundDestroyBarrier(void *barrier);
01193 
01197   PUBLIC int csoundWaitBarrier(void *barrier);
01198 
01203   PUBLIC void csoundSleep(size_t milliseconds);
01204 
01208   PUBLIC void csoundInitTimerStruct(RTCLOCK *);
01209 
01214   PUBLIC double csoundGetRealTime(RTCLOCK *);
01215 
01220   PUBLIC double csoundGetCPUTime(RTCLOCK *);
01221 
01225   PUBLIC uint32_t csoundGetRandomSeedFromTime(void);
01226 
01239   PUBLIC void csoundSetLanguage(cslanguage_t lang_code);
01240 
01246   PUBLIC char *csoundLocalizeString(const char *s);
01247 
01256   PUBLIC int csoundCreateGlobalVariable(CSOUND *,
01257                                         const char *name, size_t nbytes);
01258 
01263   PUBLIC void *csoundQueryGlobalVariable(CSOUND *, const char *name);
01264 
01271   PUBLIC void *csoundQueryGlobalVariableNoCheck(CSOUND *, const char *name);
01272 
01278   PUBLIC int csoundDestroyGlobalVariable(CSOUND *, const char *name);
01279 
01283   PUBLIC int csoundGetSizeOfMYFLT(void);
01284 
01288   PUBLIC void **csoundGetRtRecordUserData(CSOUND *);
01289 
01293   PUBLIC void **csoundGetRtPlayUserData(CSOUND *);
01294 
01303   PUBLIC int csoundRegisterSenseEventCallback(CSOUND *,
01304                                               void (*func)(CSOUND *, void *),
01305                                               void *userData);
01306 
01313   PUBLIC int csoundRunUtility(CSOUND *, const char *name,
01314                                         int argc, char **argv);
01315 
01323   PUBLIC char **csoundListUtilities(CSOUND *);
01324 
01328   PUBLIC void csoundDeleteUtilityList(CSOUND *, char **lst);
01329 
01335   PUBLIC const char *csoundGetUtilityDescription(CSOUND *,
01336                                                  const char *utilName);
01337 
01368   PUBLIC int csoundGetChannelPtr(CSOUND *,
01369                                  MYFLT **p, const char *name, int type);
01370 
01382   PUBLIC int csoundListChannels(CSOUND *, CsoundChannelListEntry **lst);
01383 
01387   PUBLIC void csoundDeleteChannelList(CSOUND *, CsoundChannelListEntry *lst);
01388 
01407   PUBLIC int csoundSetControlChannelParams(CSOUND *, const char *name,
01408                                            int type, MYFLT dflt,
01409                                            MYFLT min, MYFLT max);
01410 
01423   PUBLIC int csoundGetControlChannelParams(CSOUND *, const char *name,
01424                                            MYFLT *dflt, MYFLT *min, MYFLT *max);
01425 
01449   PUBLIC void csoundSetChannelIOCallback(CSOUND *,
01450                                          CsoundChannelIOCallback_t func);
01451 
01459   PUBLIC int csoundRand31(int *seedVal);
01460 
01466   PUBLIC void csoundSeedRandMT(CsoundRandMTState *p,
01467                                const uint32_t *initKey, uint32_t keyLength);
01468 
01473   PUBLIC uint32_t csoundRandMT(CsoundRandMTState *p);
01474 
01482   PUBLIC int csoundChanIKSet(CSOUND *, MYFLT value, int n);
01483 
01491   PUBLIC int csoundChanOKGet(CSOUND *, MYFLT *value, int n);
01492 
01500   PUBLIC int csoundChanIASet(CSOUND *, const MYFLT *value, int n);
01501 
01509   PUBLIC int csoundChanOAGet(CSOUND *, MYFLT *value, int n);
01510 
01519   PUBLIC int csoundPvsinSet(CSOUND *, const PVSDATEXT *fin, int n);
01520 
01528   PUBLIC int csoundPvsoutGet(CSOUND *csound, PVSDATEXT *fout, int n);
01529 
01566   PUBLIC int csoundSetCallback(CSOUND *, int (*func)(void *userData, void *p,
01567                                                      unsigned int type),
01568                                          void *userData, unsigned int typeMask);
01569 
01573   PUBLIC void csoundRemoveCallback(CSOUND *,
01574                                    int (*func)(void *, void *, unsigned int));
01575 
01576 
01577 
01588   void PUBLIC csoundEnableMessageBuffer(CSOUND *csound, int toStdOut);
01589 
01593   PUBLIC const char*  csoundGetFirstMessage(CSOUND *csound);
01594 
01599   int PUBLIC csoundGetFirstMessageAttr(CSOUND *csound);
01600 
01604   void PUBLIC csoundPopFirstMessage(CSOUND *csound);
01605 
01609   int PUBLIC csoundGetMessageCnt(CSOUND *csound);
01610 
01614   void PUBLIC csoundDestroyMessageBuffer(CSOUND *csound);
01615 
01616   void PUBLIC sigcpy(MYFLT *dest, MYFLT *src, int size);
01617 
01618 #if !defined(SWIG)
01619 
01631   PUBLIC void csoundSetFileOpenCallback(CSOUND *p,
01632                            void (*func)(CSOUND*, const char*, int, int, int));
01633 #endif
01634 
01635 /* This pragma must come after all public function declarations */
01636 #if (defined(macintosh) && defined(__MWERKS__))
01637 #  pragma export off
01638 #endif
01639 
01640 #endif  /* !CSOUND_CSDL_H */
01641 
01642   /* typedefs, macros, and interface functions for configuration variables */
01643 #include "cfgvar.h"
01644   /* message attribute definitions for csoundMessageS() and csoundMessageV() */
01645 #include "msg_attr.h"
01646   /* macro definitions for Csound release, and API version */
01647 #include "version.h"
01648 
01649 #ifdef __cplusplus
01650 }
01651 #endif
01652 
01653 #endif  /* CSOUND_H */
01654 

Generated on Sun Nov 9 00:04:52 2008 for Csound and CsoundAC by  doxygen 1.5.6