The main thread go into a dead loop when calling AudioPlayer::destroy()
zhouguoshan opened this issue · comments
zhouguoshan commented
- cocos2d-x version:4.0
- devices test on:
- developing environments
- NDK version:
- Xcode version:
- VS version:
- browser type and version:
Steps to Reproduce:
- The main thread go into a dead loop when calling AudioPlayer::destroy()
while (bufferProcessed < QUEUEBUFFER_NUM) { std::this_thread::sleep_for(std::chrono::milliseconds(2)); alGetSourcei(_alSource, AL_BUFFERS_PROCESSED, &bufferProcessed); }
alGetSourcei always return 0, so it's a dead loop, then the game freezes.
this will occur in iOS 14 after answer phone!