22 int res=
connect(
"CrossoverAudio");
35 for (
uint i=0; i<outCh; i++) {
36 jack_default_audio_sample_t *out = ( jack_default_audio_sample_t* ) jack_port_get_buffer (
outputPorts[i], nframes );
37 for (
uint j=0; j<maxIdx; j++)
43 for (
uint i=0; i<numIn; i++) {
44 jack_default_audio_sample_t *in = ( jack_default_audio_sample_t* ) jack_port_get_buffer (
inputPorts[i], nframes );
45 for (
uint j=0; j<maxIdx; j++)
75 audio.block(0, 0,
audio.rows(),
audio.cols())=Eigen::Matrix<float,Eigen::Dynamic,Eigen::Dynamic>::Zero(
audio.rows(),
audio.cols());
117 audio.block(0, 1,
audio.rows(),
audio.cols()-1)=Eigen::Matrix<float,Eigen::Dynamic,Eigen::Dynamic>::Zero(
audio.rows(),
audio.cols()-1);
virtual int createPorts(string inName, int inCnt, string outName, int outCnt)
virtual ~CrossoverAudio()
Destructor.
int currentInputChannel
The current input channel to test.
virtual int getBlockSize()
virtual int evaluateError(int errorNum)
unsigned int zeroSampleCnt
The number of samples to train with zeros.
virtual int startClient()
float gain
The gain for the output.
Mutex recordLock
The lock for when the audio is being played/recorded.
#define NO_ERROR
There is no error.
int samplesProcessed
The number of samples already processed.
void getChannels(int &inCnt, int &outCnt)
CrossoverAudio()
Constructor : starts connecting to Jack audio.
int setChannels(int outCnt, int inCnt, int testInCnt)
int getSampleRate(void) const
virtual int connect(string clientName_)
int samplesToProcess
The number of samples to process, matching the duration.
vector< jack_port_t * > inputPorts
The input ports.
virtual int processAudio(jack_nframes_t nframes)
The Jack client callback.
int recordNextChannelSet()
virtual int destroyPorts()
vector< jack_port_t * > outputPorts
The output ports.
Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic > audio
The first channel is the same data sent over each output channel, then the output channels...