-1

I want to add audio player in my app.I have no idea about it. I want to play songs and make playlist also...how can i do this?

khushbu shah
  • 21
  • 2
  • 4

3 Answers3

0

You can find tutorial from the following link:- http://mobileorchard.com/easy-audio-playback-with-avaudioplayer/

or

http://psychicparrotgames.com/?p=33

or

http://www.codeproject.com/KB/iPhone/abPlayer_iPhone.aspx

Hope it helps you.

Sunil Zalavadiya
  • 1,993
  • 25
  • 36
0

do as below.

#import <AVFoundation/AVFoundation.h>

NSString *musicFilePath = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"mp3"];
NSURL *musicURL = [[NSURL alloc] initFileURLWithPath:musicFilePath];

AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:musicURL error:nil];
[player prepareToPlay];
[player play];
kong
  • 423
  • 1
  • 4
  • 12