{"action":"created","issue":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/14335","repository_url":"https://api.github.com/repos/cocos2d/cocos2d-x","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/14335/labels{/name}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/14335/comments","events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/14335/events","html_url":"https://github.com/cocos2d/cocos2d-x/issues/14335","id":115455153,"number":14335,"title":"cocos2d-x iOS loop effect interrupt by the 32th effect","user":{"login":"huujiee","id":6769510,"avatar_url":"https://avatars.githubusercontent.com/u/6769510?v=3","gravatar_id":"","url":"https://api.github.com/users/huujiee","html_url":"https://github.com/huujiee","followers_url":"https://api.github.com/users/huujiee/followers","following_url":"https://api.github.com/users/huujiee/following{/other_user}","gists_url":"https://api.github.com/users/huujiee/gists{/gist_id}","starred_url":"https://api.github.com/users/huujiee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huujiee/subscriptions","organizations_url":"https://api.github.com/users/huujiee/orgs","repos_url":"https://api.github.com/users/huujiee/repos","events_url":"https://api.github.com/users/huujiee/events{/privacy}","received_events_url":"https://api.github.com/users/huujiee/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/labels/module:audio","name":"module:audio","color":"207de5"},{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/labels/type:bug","name":"type:bug","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"dumganhar","id":493372,"avatar_url":"https://avatars.githubusercontent.com/u/493372?v=3","gravatar_id":"","url":"https://api.github.com/users/dumganhar","html_url":"https://github.com/dumganhar","followers_url":"https://api.github.com/users/dumganhar/followers","following_url":"https://api.github.com/users/dumganhar/following{/other_user}","gists_url":"https://api.github.com/users/dumganhar/gists{/gist_id}","starred_url":"https://api.github.com/users/dumganhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dumganhar/subscriptions","organizations_url":"https://api.github.com/users/dumganhar/orgs","repos_url":"https://api.github.com/users/dumganhar/repos","events_url":"https://api.github.com/users/dumganhar/events{/privacy}","received_events_url":"https://api.github.com/users/dumganhar/received_events","type":"User","site_admin":false},"assignees":[{"login":"dumganhar","id":493372,"avatar_url":"https://avatars.githubusercontent.com/u/493372?v=3","gravatar_id":"","url":"https://api.github.com/users/dumganhar","html_url":"https://github.com/dumganhar","followers_url":"https://api.github.com/users/dumganhar/followers","following_url":"https://api.github.com/users/dumganhar/following{/other_user}","gists_url":"https://api.github.com/users/dumganhar/gists{/gist_id}","starred_url":"https://api.github.com/users/dumganhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dumganhar/subscriptions","organizations_url":"https://api.github.com/users/dumganhar/orgs","repos_url":"https://api.github.com/users/dumganhar/repos","events_url":"https://api.github.com/users/dumganhar/events{/privacy}","received_events_url":"https://api.github.com/users/dumganhar/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/milestones/30","html_url":"https://github.com/cocos2d/cocos2d-x/milestones/next","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/milestones/30/labels","id":1869312,"number":30,"title":"next","description":"","creator":{"login":"minggo","id":488203,"avatar_url":"https://avatars.githubusercontent.com/u/488203?v=3","gravatar_id":"","url":"https://api.github.com/users/minggo","html_url":"https://github.com/minggo","followers_url":"https://api.github.com/users/minggo/followers","following_url":"https://api.github.com/users/minggo/following{/other_user}","gists_url":"https://api.github.com/users/minggo/gists{/gist_id}","starred_url":"https://api.github.com/users/minggo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minggo/subscriptions","organizations_url":"https://api.github.com/users/minggo/orgs","repos_url":"https://api.github.com/users/minggo/repos","events_url":"https://api.github.com/users/minggo/events{/privacy}","received_events_url":"https://api.github.com/users/minggo/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":2,"state":"open","created_at":"2016-07-07T07:24:52Z","updated_at":"2016-08-01T03:51:05Z","due_on":"2016-10-17T16:00:00Z","closed_at":null},"comments":3,"created_at":"2015-11-06T07:46:50Z","updated_at":"2016-08-01T05:45:33Z","closed_at":null,"body":"http://stackoverflow.com/questions/26945149/there-has-a-bug-with-openal-or-cocos2dx"},"comment":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/comments/236494343","html_url":"https://github.com/cocos2d/cocos2d-x/issues/14335#issuecomment-236494343","issue_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/14335","id":236494343,"user":{"login":"dumganhar","id":493372,"avatar_url":"https://avatars.githubusercontent.com/u/493372?v=3","gravatar_id":"","url":"https://api.github.com/users/dumganhar","html_url":"https://github.com/dumganhar","followers_url":"https://api.github.com/users/dumganhar/followers","following_url":"https://api.github.com/users/dumganhar/following{/other_user}","gists_url":"https://api.github.com/users/dumganhar/gists{/gist_id}","starred_url":"https://api.github.com/users/dumganhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dumganhar/subscriptions","organizations_url":"https://api.github.com/users/dumganhar/orgs","repos_url":"https://api.github.com/users/dumganhar/repos","events_url":"https://api.github.com/users/dumganhar/events{/privacy}","received_events_url":"https://api.github.com/users/dumganhar/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T05:45:33Z","updated_at":"2016-08-01T05:45:33Z","body":"The person on the second floor said nearly correct.\r\n> At the end, I finally find the problem and fix it.\r\n\r\n> you need modify the init function in CDAudioManager.m file\r\n\r\n> add code:\r\n\r\n> [soundEngine setSourceGroupNonInterruptible:0 isNonInterruptible:TRUE];\r\nafter line:\r\n\r\n> soundEngine = [[CDSoundEngine alloc] init];\r\ndefault cocos2d sound engine don't check with looping or playing sfx. Now it will do it. Why me :< find so hard. Because game warning sfx stop strangely, and then find the sfx play problem, and then go into the black hole (sound engine) :< so sad...\r\n\r\nBut I don't wanna modify the default behavior of `CocosDeshion` which will interrupt the old audio  when there're more 32 audio files being played at the same time.\r\n\r\nCompared to the post, I suggest to invoke `setSourceGroupNoInterruptible` after `[self _setUpSourceGroups:sourceDefs total:1];`\r\n\r\nThat's:\r\n\r\n```objective-c\r\n- (id)init\r\n{    \r\n    if ((self = [super init])) {\r\n        \r\n        //Create mutexes\r\n        _mutexBufferLoad = [[NSObject alloc] init];\r\n        \r\n        asynchLoadProgress_ = 0.0f;\r\n        \r\n        bufferTotal = CD_BUFFERS_START;\r\n        _buffers = (bufferInfo *)malloc( sizeof(_buffers[0]) * bufferTotal);\r\n    \r\n        // Initialize our OpenAL environment\r\n        if ([self _initOpenAL]) {\r\n            //Set up the default source group - a single group that contains all the sources\r\n            int sourceDefs[1];\r\n            sourceDefs[0] = self.sourceTotal;\r\n            [self _setUpSourceGroups:sourceDefs total:1];\r\n//////////////////////////////////////////////////////////////\r\n            [self setSourceGroupNonInterruptible:0 isNonInterruptible:true]; // Add this line to modify the default behavior.\r\n//////////////////////////////////////////////////////////////\r\n            functioning_ = YES;\r\n            //Synchronize premute gain\r\n            _preMuteGain = self.masterGain;\r\n            mute_ = NO;\r\n            enabled_ = YES;\r\n            //Test whether get gain works for sources\r\n            [self _testGetGain];\r\n        } else {\r\n            //Something went wrong with OpenAL\r\n            functioning_ = NO;\r\n        }\r\n    }\r\n    \r\n    return self;\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"dumganhar"}}