AudioFile-new

This folder contains new classes for working with audio files, using the AudioToolbox AudioFile and AudioConverter API's. It is currently a work in progress. Some command-line tools using these classes are in the AudioFileTools sample project.

CAAudioFile has been reworked to optionally use the new ExtendedAudioFile API in Tiger. The functionality is essentially the same but a number of method names have been changed. To use the provided Panther-compatible implementation instead of requiring ExtendedAudioFile, define CAAF_USE_EXTAUDIOFILE to 1.

The main classes are:

CAAudioFile - wraps an AudioFile in an AudioConverter. The client specifies a PCM format to be used when reading/writing from the file, and the class performs any necessary decoding/encoding transparently. Be aware that most methods of this class may throw exceptions.

CAAudioFileStreamer / CAAudioFileReader / CAAudioFileWriter - perfom asynchronous streaming of CAAudioFiles on a separate work thread for file I/O and decoding.These classes don't actually connect to the audio hardware.

CAAudioFilePlayer / CAAudioFileRecorder - Subclasses of CAAudioFileReader / CAAudioFileWriter which use audio "output" (now I/O) units to actually play and recorder the audio.

CAChannelMapper - uses the matrix mixer audio unit for converting (downmixing if necessary) between audio channel layouts.

The other classes are support classes for the above.