版本:“cocos2d-x-3.13”
调用AudioEngine::end()抛异常:
简单例子:
experimental::AudioEngine::play2d("booknextpage.mp3");
experimental::AudioEngine::stopAll();
experimental::AudioEngine::end();
线程函数
void threadFunc()
{
while (true) {
std::function<void()> task = nullptr;
{
std::unique_lock<std::mutex> lk(_queueMutex);
if (_stop)
{
break;
}
if (!_taskQueue.empty())
{
task = std::move(_taskQueue.front());
_taskQueue.pop();
}
else
{
**_taskCondition.wait(lk);**
continue;
}
}
task();
}
}