views:

539

answers:

4

I want to use AVAudioPlayer to play M4p files from iTunes generator. I could use uiWebView to play it and it worked, but I want to put an image of my choice on the background of the player instead of the "quick time" logo. Can you help me as how to do this?

Here is an example of the m4p file I want to play with AVAudioPlayer. http://a801.phobos.apple.com/us/r1000/059/Music/b9/0d/be/mzi.zqnndbil.aac.p.m4p

Seriously, big thanks in advance!!

A: 

I am really interested in this topic too. Anyone found a solution here or did you found out yourself??

Thanks a lot...!

tommy
A: 

If your question is, "can someone help me figure out how to use AVAudioPlayer," then I'd recommend taking a look at Apple's avTouch sample app, the documentation for AVAudioPlayer, and the guide Getting Started with Audio & Video.

Sixten Otto
A: 

Thanks for the hints... My Problem is the following. I got this code and i guess a corrupt NSURL since the AVAudioPlayer is nil after initializing:

NSString *dummyURLString = @"http://a825.phobos.apple.com/us/r2000/005/Music/d8/a8/d2/mzi.jelhjoev.aac.p.m4p";
NSError *error;
NSURL *url = [NSURL URLWithString:dummyURLString]; 
AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error];
[player play];

Any suggestions? The &error shows this:

Error Domain=NSOSStatusErrorDomain Code=-43 "Operation could not be completed. (OSStatus error -43.)"
tommy
You'd get more responses if you start a new question, rather than use the Answers sections to create a thread.
mahboudz
A: 

When it happened to me I had a missing '/' on the end of my url. Adding that cleared me right up.

Will