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

PUBLIC MYFLT csoundChanOAGetSample ( CSOUND *  ,
int  channel,
int  frame 
)

Sets the chani opcode MYFLT a-rate value for the indicated frame for the indicated channel. The bus is automatically extended if the channel is greater than previously used, clearing new locations to zero. Returns the sample value 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 221 of file bus.c.

References csoundChanOAGetSample().

Referenced by csoundChanOAGetSample().

{
  if (n < 0)
    return CSOUND_ERROR;
  n *= csound->ksmps;
  if ((unsigned int)n >= (unsigned int)csound->nchanoa) {
    int   err = chan_realloc(csound, &(csound->chanoa),
                       &(csound->nchanoa), n + csound->ksmps);
    if (UNLIKELY(err))
      return err;
  }
  return csound->chanoa[n + i];
}


Generated by  Doxygen 1.6.0   Back to index