SPKitWriter is connected to its input object and output soundfile with the setInputOutput(SPKitProcessor* ip, char* sf) function, where ip is a pointer to the input object and sf is the name of the output soundfile. setInputOutput() opens the soundfile for writing. It overwrites an existing file by the same name as in sf.
SPKitWriter writes the audio samples with either the run() or runFor(int nSamples) function. run() writes all samples in one loop, while runFor() writes in batches on nSamples per call. runFor return the number of samples written.
Here is an example.
The current implementation of SPKitWriter supports only 16 bit linear NeXT/SUN audio files.
SPKitWriter defines run() and runFor() functions for writing audio samples into a soundfile. SPKitWriter also defines a setInputOutput() function for connecting the object to its input object and output soundfile.
The setInput() and getSample() functions defined in SPKitProcessor should not be used with SPKitWriter.
Sets input to ip.
Calls SPKitProcessor::setInput().
Kai Lassfolk / University of Helsinki / kpl@elisir.helsinki.fi