I use this code when my ball crashes with an obstacle:
auto audio = CocosDenshion::SimpleAudioEngine::getInstance();
But my game freezes for a bit (like a second or less). If I remove the code above, it doesn’t freeze, it runs smoothly.
What can I do to make the game run smoothly along with sound effects? Thanks!