Loading Audio Asynchronously

Loading Audio Asynchronously
0.0 0


In cocos2d, it can use the follow lines to create a thread running in the background to load audio asynchronously.
NSOperationQueue queue = autorelease];
asyncSetupOperation =
[[NSInvocationOperation alloc] initWithTarget:self
But how can I do that in cocos2d-x. I haven’t found its corresponding methods.Please help.


You can use pthread to create a new thread. It isn’t very convenient but it works.


Thanks a lot. I will have a try.