Building a Playback Engine

Before it makes sense to pull in any audio data, an in-depth understanding of the playback controls is required. To play music from within an app, a new instance of MPMusicPlayerController needs to be created. This is done in the header file ICFViewController.h, and the new object is called player. The MPMusicPlayerController will be referenced throughout this chapter to control the playback as well as retrieve information about the items being played.

@interface ICFViewController : UIViewController{    MPMusicPlayerController *player;}@property (nonatomic, retain) MPMusicPlayerController *player;

Inside the viewDidLoad method, the MPMusicPlayerController player can be initialized using ...

Get iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.