Pergunta

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?

Foi útil?

Solução

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.)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top