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

PUBLIC void csoundSetChannelIOCallback ( CSOUND csound,
CsoundChannelIOCallback_t  func 

Sets callback function to be called by the opcodes 'chnsend' and 'chnrecv'. Should be called between csoundPreCompile() and csoundCompile(). The callback function takes the following arguments: CSOUND *csound Csound instance pointer const char *channelName the channel name MYFLT *channelValuePtr pointer to the channel value. Control channels are a single MYFLT value, while audio channels are an array of csoundGetKsmps(csound) MYFLT values. In the case of string channels, the pointer should be cast to char *, and points to a buffer of csoundGetStrVarMaxLen(csound) bytes int channelType bitwise OR of the channel type (CSOUND_CONTROL_CHANNEL, CSOUND_AUDIO_CHANNEL, or CSOUND_STRING_CHANNEL; use channelType & CSOUND_CHANNEL_TYPE_MASK to extract the channel type), and either CSOUND_INPUT_CHANNEL or CSOUND_OUTPUT_CHANNEL to indicate the direction of the data transfer The callback is not preserved on csoundReset().

Definition at line 751 of file bus.c.

References csoundSetChannelIOCallback().

Referenced by csoundSetChannelIOCallback().

    csound->channelIOCallback_ = func;

Generated by  Doxygen 1.6.0   Back to index