Version: 1.0

Posted: 2006-08-22

Build Requirements: Macintosh: Xcode 2.4 or greater with QuickTime 7.1.x SDK Windows: Visual Studio Dot Net (Visual C++ Dot Net edition) with QuickTime 7.1.x SDK.

Runtime Requirements: Mac OS X 10.4.6 w/QuickTime 7.1.1 or greater or a version of Windows capable of running QuickTime 7.1 or greater.

View Source Code:

Download Sample (“scaudiocompress.zip”, 35.8K)
Download Sample (“scaudiocompress.dmg”, 97.1K)



Description

scaudiocompress is a command line utility that illustrates usage of the SCAudio component SCAudioFillBuffer API's.

Since QuickTime 7, SCAudio (also known as Standard Audio Compression component, StdAudio, StdAudio Dialog and even 'scdi'/'audi') has allowed clients to configure an audio export operation, given an input format, (optionally) a starting output format, and (optionally) some rules about the kinds of output allowed.

StdAudio exposes all of its functionality via properties and the QTSet/GetComponentProperty{Info} API's. In addition, it allows a client to display the standard QuickTime audio compression dialog using SCRequestImageSettings().

New in QuickTime 7.1, the StdAudio component not only allows one to configure an export, it can actually perform the export using an interface identical to AudioConverter's AudioConverterFillComplexBuffer API.

The value added is that:

(1) the StdAudio path incorporates a mixer into its chain, so it can perform mix-downs in addition to encodes, decodes, and transcodes.

(2) It is available on MacOSX/Windows as part of the QuickTime 7.1 SDK. SCAudioFillBuffer's processing chain uses:

(1) an AudioConverter for decode (if necessary)

(2) a MatrixMixer for mixing (if necessary)

(3) another AudioConverter for encode (if necessary)

The scaudiocompress tool demonstrates how to read source packets of audio using AudioFile API (when reading from audio files) or MovieAudioExtraction (when sourcing from a QuickTime movie). The source data is pulled through the StdAudio compression chain, then written to an output file using AddMediaSample2 (if writing to a QuickTime movie), AudioFileWritePackets (if writing a .caf file), or fwrite (if writing a raw interleaved headerless pcm file). scaudiocompress can be run headlessly, or in "interactive" mode, popping up the StdAudio dialog to allow a user to select an output format, if desired.

The code runs on Mac OS X or Windows (NOTE: on Windows, reading/writing is limited to QuickTime movies, as the AudioFile API is not available in the Windows environment).

Document Revision History

Date Notes
2006-08-22Xcode 2.4
2006-07-28Demonstrates audio compression using QuickTime Standard Audio Compression Component

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.