Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Overview of Audio Codec

Audio codecs are encoders and decoders provided by Apple or third-party developers for the purpose of compressing and decompressing audio streams into and from encoded formats. While codec use is encouraged, normal use should be performed through the “Audio Converter.”

Before developing an audio codec for Mac OS X, install the Core Audio SDK, available from http://developer.apple.com/audio/.

Of particular interest are the contents of /AudioCodecs/ACPublic/, in the installed SDK.

In this section:

The ACCodec Class
The ACBaseCodec Class
The ACSimpleCodec Class
Miscellaneous Headers


The ACCodec Class

ACCodec is an abstract class that defines the basic methods that an audio codec must implement. At the very least, all codecs must subclass ACCodec to provide basic services for those who wish to use the codec, based on standard methods of communication expected of them. However, two subclasses of ACCodec are provided, which implement many of this class’s abstract methods for your convenience.

The ACBaseCodec Class

ACBaseCodec is a subclass of ACCodec and provides many of the services needed by most codecs to interact with codec clients. Property management is fully implemented in ACBaseCodec but you may override it as needed. Also, this class provides format management for input and outputs, including getting and setting the number of input and output formats, and getting and setting the AudioStreamBasicDescription format information for inputs and outputs.

ACBaseCodec does not implement a buffer for the codec, however, and you must implement all methods pertaining to buffer usage, depending on your chosen buffer size and implementation.

When developing an audio codec, you must subclass ACBaseCodec.

The ACSimpleCodec Class

ACSimpleCodec, a subclass of ACBaseCodec, provides a ring buffer implementation with a variable buffer size providing for reallocation of the buffer. This class is provided as a convenience for you in cases where you don’t need a custom buffering scheme. When developing a codec, you don’t need to subclass ACSimpleCodec, so long as you provide a buffering scheme.

Miscellaneous Headers

Inside /AudioCodecs/ACPublic/ are other headers that need not be modified but are necessary for the operation of a codec, and therefore are included in order for the codec to operate properly:



< Previous PageNext Page > Hide TOC


Last updated: 2004-03-25




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice