SPKitSum


User's Guide

SPKitSum outputs the summed signal of one or more inputs. The first input is connected to a SPKitSum instance with the standard setInput(SPKitProcessor*) function. Additional inputs are connected with the addInput(SPKitProcessor*) function.

Notes:


Programmer's Reference

Defined in <spkit/sum.h>
Inherits from SPKitProcessor

SPKitSum defines an addInput() function for connecting additional inputs and overrides getSample().

Public Members

SPKitError setInput(SPKitProcessor* newInput)
connect an input to the object and initialize it. Adds newInput to inputList.

Calls SPKitProcessor::setInput().

void addInput(SPKitProcessor* newInput)
connect an additional input to the object. Adds newInput to inputList.
int getSample(SPKitSample& outputSample)
retrieve a processed audio sample

getSample() requests a sample from each of its inputs and stores the summed result in outputSample.

The function returns 0 when all its inputs run out of samples, 1 otherwise.

Protected Members

SPKitProcessor* inputList[MAXINPUTS]
an array of signal input. MAXINPUTS is 256.
int inputCount
amount of signal inputs

Return to SPKit home

Kai Lassfolk / University of Helsinki / kpl@elisir.helsinki.fi