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

PUBLIC int csoundChanIKSet ( CSOUND *  csound,
MYFLT  value,
int  n 
)

Sends a MYFLT value to the chani opcode (k-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 99 of file bus.c.

References csoundChanIKSet().

Referenced by csoundChanIKSet().

{
    if (n < 0)
      return CSOUND_ERROR;
    if ((unsigned int)n >= (unsigned int)csound->nchanik) {
      int   err = chan_realloc(csound,
                               &(csound->chanik), &(csound->nchanik), n + 1);
      if (UNLIKELY(err))
        return err;
    }
    csound->chanik[n] = value;
    return CSOUND_SUCCESS;
}


Generated by  Doxygen 1.6.0   Back to index