We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
Fix for can't pause/stop looped sound effect in windows
Fix for can't pause/stop looped sound effect in windows
Bug #3045 [Closed]
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.
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.
Redmine issue system is closed, we are using github issue system instead.
This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8238
Status: | Closed | |
---|---|---|
Start date: | 2013-10-23 | |
Priority: | Low | |
Due date: | ||
Assignee: | - | |
% Done: | 0% |
|
Category: | windows | |
Target version: | - |
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.