Projects > cpp > Issues > Bug #3045

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

Fix for can't pause/stop looped sound effect in windows

Bug #3045 [Closed]
mightymenace 2013-10-23 01:30 . Updated almost 9 years ago

I discovered this issue when I ported my game to windows using VS 2012. When I looped a sound effect I couldn’t stop that sound effect when calling stopEffect or pauseEffect. It appears that the issue is how the command variable is passed, an int versus unsigned int. I dug into CocosDenshion::MciPlayer and changed the function MciPlayer::*SendGenericCommand to MciPlayer::*SendGenericCommand(UINT nCommand) which resolved the issue.

mightymenace 2013-10-23 02:23

It appears that my “solution” doesn’t completely resolved the issue. Most of the times the sound does stop/pause but sometimes it does not. However repeat calls of the stop/pause command eventually stops/pauses the sound. 2013-12-26 05:53

I got similar bug in android. I just can’t stop looped sound effect sometimes. If I call stopEffect serval times. It will be stopped. 2014-10-08 03:00

Redmine issue system is closed, we are using github issue system instead.

This issue was moved to

Atom PDF

Start date:2013-10-23
Due date:
% Done:


Target version:-