Typically rtaddout is used in the sample-computing loop inside the INSTRUMENT::run() member function. rtaddout assumes that rtsetoutput() was called in the INSTRUMENT::init() member function.
It replaces
the older ADDOUT macro used in
disk-only cmix.
For example, if the output were stereo, frame_array would be declared like this:
float frame_array[2];
#include <Instrument.h> int MYINSTRUMENT::run() { float out[2]; for (i = 0; i < chunksamps; i++) { ... out[0] = leftchannelsample; out[1] = rightchannelsample; rtaddout(out); } }