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

PUBLIC int csoundGetTable ( CSOUND ,
MYFLT **  tablePtr,
int  tableNum 
)

Stores pointer to function table 'tableNum' in *tablePtr, and returns the table length (not including the guard point). If the table does not exist, *tablePtr is set to NULL and -1 is returned.

Definition at line 2019 of file fgens.c.

{
    FUNC    *ftp;

    if (UNLIKELY((unsigned int) (tableNum - 1) >= (unsigned int) csound->maxfnum))
      goto err_return;
    ftp = csound->flist[tableNum];
    if (UNLIKELY(ftp == NULL))
      goto err_return;
    if (!ftp->flen) {
      ftp = gen01_defer_load(csound, tableNum);
      if (UNLIKELY(ftp == NULL))
        goto err_return;
    }
    *tablePtr = &(ftp->ftable[0]);
    return (int) ftp->flen;

 err_return:
    *tablePtr = (MYFLT*) NULL;
    return -1;
}


Generated by  Doxygen 1.6.0   Back to index