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]
[[NSBundle mainBundle] pathForResource:@&quot;sample&quot; ofType:@&quot;m4a&quot;]];
- (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag
if (flag == NO)
NSLog(@&quot;Playback finished unsuccessfully&quot;);
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.