Mac OS X Reference Library Apple Developer Connection spyglass button

Version: 1.0

Posted: 2006-03-03

Build Requirements: Microsoft Visual Studio .NET 2003, Microsoft .NET Framework, DirectX 9 SDK

Runtime Requirements: QuickTime 7 for Windows, Windows 2000 or XP

View Source Code:

Download Sample Code (“QTSetMovieAudioDevice.zip”, 39.7K)



Description

QTSetMovieAudioDevice is a simple sample which demonstrates how to create a QTAudioContext for a given audio output device and then target a movie to render to this audio context.

To accomplish this, first use native Windows DirectX APIs to enumerate a list of all available sound output devices. Next, call the QuickTime QTAudioContextCreateForAudioDevice API to create a QuickTime Audio Context (QTAudioContext) from either a device GUID or device name.

Note -- you must have QT 7.0.4 or better installed to create a QuickTime Audio Context from a GUID.

Finally, call SetMovieAudioContext to target the movie to render to the QuickTime Audio Context.

Document Revision History

Date Notes
2006-03-03Create a QT audio context for an audio output device and target a movie to render to the context
Did this document help you? Yes It's good, but... Not helpful...