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

PUBLIC int csoundChanOKGet ( CSOUND csound,
MYFLT *  value,
int  n 

Receives a MYFLT value from the chano 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 121 of file bus.c.

References csoundChanOKGet().

Referenced by csoundChanOKGet().

    if (n < 0)
      return CSOUND_ERROR;
    if ((unsigned int)n >= (unsigned int)csound->nchanok) {
      int   err = chan_realloc(csound,
                               &(csound->chanok), &(csound->nchanok), n + 1);
      if (err)
        return err;
    (*value) = csound->chanok[n];
    return CSOUND_SUCCESS;

Generated by  Doxygen 1.6.0   Back to index