There are two basic issues in porting SPKit:

1. Native sound I/O support

The current I/O classes (SPKitReader and SPKitWriter) use ANSI C
standard I/O libraries. On some platforms (such as the Macintosh)
the I/O classes will have to be rewritten to support native I/O calls.

The SPKitReader::setInput() and SPKitWriter::setInputOutput()
member functions refer to the input or output soundfile by taking the
filename as a parameter. On the Macintosh, the best approach would
probably be to substitute the filename parameter with a pointer to a
file system specification record. The declarations of the I/O classes
would then be:

class SPKitReader : public SPKitProcessor {
public:
    setInput(FSSpec*);
    ...
};

and

class SPKitWriter : public SPKitProcessor {
public:
    setInputOutput(SPKitProcessor*, FSSpec*);
    ...
};

Adding support for sound data I/O from sources other than files (such as
an analog/digital converter or a pasteboard) is possible by overloading
SPKitReader::setInput() and SPKitWriter::setInputOutput() and
by modifying SPKitReader::getSample, SPKitWriter::run() and
SPKitWriter::runFor().

2. Native soundfile format support

Supporting soundfile formats other than NeXT/Sun requires rewriting
most of SPKitReader and SPKitWriter.

SPKitReader::setInput() should open the soundfile for reading,
read the header information and set inputSamplingRate,
inputChannelCount, originalDataFormat sampleCount and samplesLeft.
originalDataFormat may be used as a platform specific attribute.
It is used to provide information to the SPKitWriter on sample encoding,
compression etc. of the input soundfile(s). If SPKitWriter supports
only one output sample encoding format, originalDataFormat may be
ignored.

SPKitReader::getSample() should read a single sample from the input
soundfile, convert it to SPKitFloat and scale it between -1.0 and
1.0.

The destructor of SPKitReader should close the input soundfile.

SPKitWriter::setInputAndOutput() should open a soundfile for writing
and write a header to the soundfile.

SPKitWriter::run() should request samples from the input object
in a loop, scale each sample (e.g. between -32768 and 32767 in 16-bit
linear interger encoding) and write them to the output file.
SPKitWriter::runFor() should do the same thing for a given number
of samples.

The SPKitWriter destructor should close the output soundfile.
