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

PUBLIC int csoundChanIKSetValue ( CSOUND *  ,
int  channel,
MYFLT  value 
)

Sets the chani opcode MYFLT k-rate value for the indicated channel. The bus is automatically extended if the channel is greater than previously used, 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 estend the bus.

Definition at line 178 of file bus.c.

References csoundChanIKSetValue().

Referenced by csoundChanIKSetValue().

{
    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