title: How to play multiple audio files in sequence by loop in AVAudioPlayer?
body: <p>I want to play multiple files by using loop.<br>
  I written code below..<br>
  Please help me.!!..<br></p>
  
  <pre><code>soundList = [[NSArray alloc] initWithObjects:@"mySong1.mp3",@"mySong2.mp3",@"mySong3.mp3",@"mySong4.mp3",@"mySong5.mp3",@"mySong6.mp3",@"mySong7.mp3",@"mySong8.mp3",@"mySong9.mp3", nil];
  for (i=0; i&lt;=([soundList count] - 1); ) {                
      while(i&lt;[soundList count]){
          NSLog(@"File is : %@",[soundList objectAtIndex:i]);
          mediaPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[[NSURL alloc] initFileURLWithPath:[[NSBundle mainBundle] pathForResource:[soundList objectAtIndex:i] ofType:nil]] error:&amp;error];
          [mediaPlayer setDelegate:self];
          self.lblCurrentSongName.text = [soundList objectAtIndex:i];
          [mediaPlayer prepareToPlay];
          i++;
      }
  }
  </code></pre>
  
  <p>Please give me suggestion .!!..</p>