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

PUBLIC int csoundChanIASet ( CSOUND csound,
const MYFLT *  value,
int  n 

Sends ksmps MYFLT values to the chani opcode (a-rate) at index 'n'. The bus is automatically extended if 'n' exceeds any previously used index value, clearing new locations to zero. Returns zero on success, CSOUND_ERROR if the index is invalid, and CSOUND_MEMORY if there is not enough memory to extend the bus.

Definition at line 142 of file bus.c.

References csoundChanIASet(), and CSOUND_::ksmps.

Referenced by csoundChanIASet().

    if (n < 0)
      return CSOUND_ERROR;
    n *= csound->ksmps;
    if ((unsigned int)n >= (unsigned int)csound->nchania) {
      int   err = chan_realloc(csound, &(csound->chania),
                               &(csound->nchania), n + csound->ksmps);
      if (err)
        return err;
    memcpy(&(csound->chania[n]), value, sizeof(MYFLT) * csound->ksmps);
    return CSOUND_SUCCESS;

Generated by  Doxygen 1.6.0   Back to index