0

I have more than 20 small (around 3 seconds duration) audio files related to animals & birds. I want to play those audio files continuously at regular interval. For example, audio 1 has to loop after every 10 seconds, audio 2 has to loop after every 12 seconds and so on.
As the number of audio files are more, we cannot play using AVFoundation Framework. Open AL is best suited for that so that I can add sound effects as well.
What I want to know is how to play them continuously at some frequency.
is there any default method/api to achieve this?

zoul
  • 102,279
  • 44
  • 260
  • 354
Satyam
  • 15,493
  • 31
  • 131
  • 244

1 Answers1

0

If you want to play short samples using OpenAL, take a look at the Finch sound engine. To repeat the sounds after given time, set up a repeating NSTimer, one for each sound you want to repeat. (It might be worthwhile to create a standalone class wrapping the timer and the sound.)

zoul
  • 102,279
  • 44
  • 260
  • 354
  • I understood that we've to use NSTimer, don't we have any api to repeat the at some audio interval? Something like have a buffer with sounds to play at particular time and give the buffer to open AL which plays at that instance of time. – Satyam Jan 31 '13 at 02:19
  • I don’t think there’s a special API for that, precisely because it’s so easy to write using existing APIs. – zoul Jan 31 '13 at 07:25