Why don't you use threads?
You can do it easily by using:
- (void)performSelectorInBackground:(SEL)aSelector withObject:(id)arg
or by using NSOperation
with a NSOperationQueue
.
Have a look at this question for more details.
Notes:
- you'll need an autorelease pool in your thread if you use any autoreleased classes
- if you want to use a timer in another thread you'll also need another runloop.
- watch out for thread safetiness. For instance, I don't know if AVAudioPlayer can be used on a thread different from the main thread.
- I don't think you can schedule a NSTimer from within a NSOperation