It is still the responsibility of the RTcmix instrument
designer to properly handle differing numbers of input
channels (i.e. mono vs. stereo) in the Instrument::run()
method. Ortgetin
will configure it's input buffers and returned sample array
based upon the values of the
RTBUFSAMPS
parameter. Ortgetin will automatically read a new input
buffer whenever the current buffer of input samples is exhausted.
See the
instrument design
tutorial for more information on how Ortgetin is used.
Constructors
Ortgetin(Instrument *inst)
Access Methods
float Ortgetin::next(float *inarray)
Examples
#include <Ougens.h>
Ortgetin *theIn;
// this instrument will generate noise
int MYINSTRUMENT::init(float p[], int n_args)
{
...
rtsetinput(inputskip, this);
theIn = new Ortgetin(this);
...
}
int MYINSTRUMENT::run()
{
float out[2];
float in[2];
...
for (i = 0; i < framesToRun(); i++)
{
theIn->next(in);
out[0] = in[0];
out[1] = in[1];
rtaddout(out);
}
...
}