cocos2d-x icon indicating copy to clipboard operation
cocos2d-x copied to clipboard

Fix iOS audio deadloop / v3

Open PatriceJiang opened this issue 5 years ago • 2 comments
trafficstars

issue: https://github.com/cocos2d/cocos2d-x/issues/18597 clone: https://github.com/simdsoft/x-studio/commit/75e6c0c83c03fc0c4d22d9606a3cdeaf9bb3cbbc

PatriceJiang avatar Jul 15 '20 03:07 PatriceJiang

Thank you for posting this fix. I haven't tried it out yet, but I have a related question.

I've noticed audio occasionally cuts out when running on an iOS device (everything else continues to run though). Is that potentially a result of the deadloop?

(I would test out the fix now but currently don't have access to an iOS device)

I ask because this issue (random audio drop out) seems a little different to the issues described in #18597. For example, this issue sometimes occurs while running in the foreground. It is not a result of an external button press or incoming phone call. It just happens seemingly sporadically from time to time, and sometimes not at all.

I've tested out on win32 and android and haven't had this issue there so it does seem to an iOS specific issue.

Josh1603 avatar Dec 29 '20 02:12 Josh1603

I just got a feedback crash report about this in TestFlight.

I'm curious if this was an actual deadlock or crash, or maybe it's transient and while it's an issue maybe the user can keep playing the game without noticing or at least without any game-breaking issue?

Also, would it make sense to set it to null before the error check, so if the function returns on error it'll be set to NULL? Or, do you only need to force it to set the context to NULL when you're setting the context as a workaround for an internal OpenAL bug?

stevetranby avatar Jul 19 '22 19:07 stevetranby