Closed

Play multiple audio files using AVAudioPlayer

I am planning on releasing 10 of my song recordings for free but bundled in an iphone app. They are not available on web or itunes or anywhere as of now.

I am new to iphone sdk (latest) as you can imagine, so I have been going through the developer documentation, various forums and stackoverflow to learn.

Apple's avTouch sample application was a great start. But I want my app to play all the 10 tracks one by one. All the songs are added to resources folder and are named as track1, track2...track10.

In the avTouch app code I can see the following 2 parts which is where I think I need to make changes to achieve what I am looking for. But I am lost.

// Load the array with the sample file

NSURL *fileURL = [[NSURL alloc]

initFileURLWithPath:

[[NSBundle mainBundle] pathForResource:@"sample" ofType:@"m4a"]];

- (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag

{

if (flag == NO)

NSLog(@"Playback finished unsuccessfully");

[player setCurrentTime:0.];

[self updateViewForPlayerState];

}

can anyone please help me on

1. how to load the array with all the 10 tracks which are added to resources folder

2. and when I hit play, player should start the first track. when the 1st track ends 2nd track should start and so on for the remaining tracks.

Thank You

Skills: iPhone, Mobile App Development, Objective C

See more: avaudioplayer play multiple files, avaudioplayer m4a multiple, avaudioplayer multiple, play multiple audio files iphone, multiple avaudioplayer, array avaudioplayer, avaudioplayer itunes, avaudioplayer, avaudioplayer array, play multiple audio files using avaudioplayer, avaudioplayer multiple files, avaudioplayer multiple audio, play multiple songs using avaudioplayer iphone, avaudioplayer m4a, play itunes tracks avaudioplayer, avaudioplayer multiple tracks, avaudioplayer iphone, play array tracks avaudioplayer, avaudioplayer play multiple, play songs iphone using avaudioplayer

About the Employer:
( 0 reviews ) melbourne, India

Project ID: #799890

6 freelancers are bidding on average $83 for this job

FaisalBuet03

Hi, I am an iPhone APP developer since two years. I am doing job in a iPhone App compnay. My projects on AppStore: 1.3D wallpapers: [login to view URL] (Ratin More

$50 USD in 2 days
(8 Reviews)
4.7
rajforiPhone

Hi, Please check PMB.

$40 USD in 1 day
(1 Review)
3.4
ahmedragabamin

Work Experience: 1. Company Name: Best Buy (Apple Authorized Reseller And Training Center) Location: Egypt Job: Instructor & Developer Responsibilities: . Teach Apple Mac OS X in Best Buy Center and El-Shero More

$30 USD in 15 days
(4 Reviews)
2.9
iphonedev4u

Please check your PMB.

$125 USD in 5 days
(1 Review)
2.4
jorgemendoza

Hi, i use mp3 files for background music in some of the games am developing for the iphone, if you want the people to listen to your songs in the app, its kind of the same than playing background music.

$200 USD in 5 days
(1 Review)
2.0
metterhuang

I've already done it! please check the PM for the update demo.

$50 USD in 1 day
(0 Reviews)
0.0