Performance issues when playing sounds (Windows only)

Performance issues when playing sounds (Windows only)
0.0 0


When playing sounds on Windows 7 I notice pausing and lag related issues. This is especially apparent when playing background music that is more than a couple of minutes long, but there are also occasional pauses when playing short effects. The same project runs on the iPhone 3GS and iPhone 4 perfectly fine. I’ve tested on multiple Windows 7 machines and have the same results on each machine. The sounds are being preloaded. Has anyone else experienced this problem?


I can confirm I have this problem as well at least with starting background music in windows and only when run in the background. This even happens in the test demo. A quick look and it seems like it is taking a while to create and start the thread. Wouldn’t it be better to always have a background thread pool so they don’t have to be created and deleted all the time? Just a thought.


Sorry to resurrect a dead thread here, but it’s 2 years on and I’m having the exact same performance issues where starting any effect causes a noticeable frameskip in the game. I won’t bang on about it too much because I know sound is about to be overhauled, but can any devs confirm that sound performance in Windows will be addressed going forward?



This is the exact problem that brought me to the forums. :edit: I was originally using .MP3 versions of the audio files. :edit: I tried using .WAV versions of the audio files, and that did seem to help a small amount, but there was still very noticeable lag in the game which renders it unplayable. This is only on Windows, but even occurs on Windows when running an Android emulator. But when run on an actual Android device, it runs just fine.

I have just finished Sonar Systems Flappy Bird C++ tutorial series (which is great for Cocos2d-x beginners like me, btw :smiley: ). When I tap the screen to make my Faby-clone fly up, there is a serious frame rate drop which makes it impossible for Faby-clone to get to the gap between the pipes.

Being a beginner with Cocos2d-x, I would really like to stay with the built in systems rather than resort to using a separate sound engine like FMOD (considering all of the set-up and educational overhead that would bring). Are there any workarounds or best practices that need to be followed. Is there a chance that this is being addressed in the overhaul that @kingchimp mentioned? That would be great.

Thanks for all of your hard work Cocos2d-x team! :smiley: