Version: 1.0

Posted: 2006-11-08

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

View Source Code:

Download Sample (“QTExtractAndConvertToAIFF.zip”, 110.9K)
Download Sample (“QTExtractAndConvertToAIFF.dmg”, 168.9K)



Description

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.

Document Revision History

Date Notes
2006-11-08Demonstrates using MovieAudioExtraction and an AudioConverter to extract and convert audio to a AIFF file.

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.