June 2011
Intermediate to advanced
590 pages
19h 31m
English
To play a compressed audio format or any file that is longer than 30 seconds, you use the class AVAudioPlayer. In addition to playing longer compressed audio, this class also gives you more control over audio playback.
The AVAudioPlayer class is defined in the AVFoundation framework. Add the AVFoundation framework to your project and import its header file into MediaPlayerViewController.h. Declare an instance variable of type AVAudioPlayer.
#import <AVFoundation/AVFoundation.h>
@interface MediaPlayerViewController : UIViewController <AVAudioPlayerDelegate> { IBOutlet UIButton *audioButton; ...Read now
Unlock full access