Sound sync with CCAnimation

I have CCSpeed, which contains CCAnimation, which dynamically changes its speed based on the materials that occur in the game. Is there a way to make the animation call the selector every time the animation is β€œticking” (switch frame) in this particular case, in order to produce sound?

Edit: other solutions for synchronizing animation ticks with sound are also welcome

+4
source share
1 answer

I wonder if QuartzCore / CADisplayLink can be what you are looking for.

You can create it using -[UIScreen - displayLinkWithTarget:selector: ]

You can get a callback for each screen refresh cycle (VBL).

0
source

All Articles