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

< Previous PageNext Page > Hide TOC

Setting an Audio Context

QuickTime normally sends audio to the default audio output for your system. Channels are automatically mixed-down as needed (when playing multichannel sound through a stereo output, for example).

To direct the audio output of a movie to a particular device, or to set up a channel configuration or assign individual sound tracks to particular channels, create an audio context.

To create an audio context, call QTAudioContextCreateForAudioDevice and pass in the UID of an output device. An audio context reference is returned. Pass that audio context ref either to NewMovieFromProperties, as you would pass in a visual context, or to SetMovieAudioContext, to redirect the output of an existing movie.

Audio contexts are not shareable. If you want to route the output of two or more movies to the same device, call QTAudioContextCreateForAudioDevice once for each movie, passing in the same device UID to get another audio context for the same device. Pass a separate audio context reference to each movie.

You can pass NULL as the UID to QTAudioContextCreateForAudioDevice to create an audio context for the default audio output.

Note: As of this writing (QuickTime 7.01), audio contexts are not supported for MPEG audio tracks or streaming audio tracks.



< Previous PageNext Page > Hide TOC


Last updated: 2005-08-11




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