Last Revision:
Version 1.0, 2006-11-08
Demonstrates using MovieAudioExtraction and an AudioConverter to extract and convert audio to a AIFF file.
Build Requirements:
Xcode 2.3 or greater using the Mac OSX 10.4 Universal SDK
Runtime Requirements:
Mac OS X 10.4.7 or greater, QuickTime 7.1.3 or greater

QTExtractAndConvertToAIFF contains two Objective-C objects that are used together to implement audio extraction and audio conversion from a QuickTime Movie sound track to an AIFF file. The first is a simple class called AIFFWriter (a modified version of the AIFFWriter class that was included with the ExtractMovieAudioToAIFF sample) that encapsulates the functionality of two sets of APIs; QuickTime's Audio Extraction API's and Core Audio's Audio File APIs. The second is another simple class called AudioConverter which encapsulates Core Audio's Audio Converter API. The sample uses an instance of the AIFFWriter class to easily set up audio extraction from a QTKit QTMovie to an AIFF file. AIFFWriter uses an instance of the AudioConverter class to perform the conversion to a user selected destination format which is configured by the Standard Audio Dialog Component. The Audio Converter uses a Movie Audio Extraction Session in it's Read Input Procedure to pull audio out of the Movie. IMPORTANT NOTE FOR QUICKTIME DEVELOPERS: While this example demonstrates using the Audio Converter APIs directly, QuickTime developers may want to consider using the crossplatform SCAudioFillBuffer API introduced in QuickTime 7.1. SCAudio is built on top of Core Audio and incorporates a mixer into its chain, so it can perform mix-downs in addition to encodes, decodes, and transcodes. It also maintains an interface identical to AudioConverter's AudioConverterFillComplexBuffer. See the SCAudioCompress sample for more details.