iPhone OS Reference Library Apple Developer Connection spyglass button

Version: 1.1

Posted: 2009-07-29

Build Requirements: iPhone OS 3.0 or later

Runtime Requirements: iPhone OS 3.0 or later

View Source Code:

Download Sample Code (“avTouch.zip”, 136.0K)



Description

avTouch demonstrates basic use of AVFoundation, Core Animation, and Core Graphics Services on the iPhone for basic playback of audio files.

The code in avTouch uses AVFoundation to play an audio file containing AAC audio data. The application uses CoreGraphics and OpenGL to display volume meters for the audio being played.

This application shows how to:

* Create an AVAudioPlayer object from an input audio file.

* Use OpenGL and CoreGraphics to display metering levels.

* Use Audio Session Services to set an appropriate audio session category for playback.

* Use AVFoundation's interruption delegate to pause playback upon receiving an interruption, and to then resume playback if the interruption ends.

* Demonstrates technique from performing Fast Forward and Rewind.

Document Revision History

Date Notes
2009-07-29Update Base SDK to 2.2.1
2009-04-29Editorial update
2009-04-15avTouch is a sample project for playing an audio file using the AVFoundation framework
Did this document help you? Yes It's good, but... Not helpful...