cocos2dx-lua 3.17.2 在android5.0的系统上播放音效崩溃

在android5.0的手机上播放音频就闪退,如(vivo y51)
backtrace:
#00 pc 00000000000198ec /system/lib64/libc.so (pthread_mutex_lock+28)
#00 pc 0000000000f4b86c /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so (std::__ndk1::mutex::lock()+8)
#00 pc 0000000000941340 /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so (cocos2d::experimental::AudioMixerController::addTrack(cocos2d::experimental::Track*)+52)
#00 pc 000000000093ebdc /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so (cocos2d::experimental::PcmAudioPlayer::play()+24)
#00 pc 0000000000936b90 /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so (cocos2d::experimental::AudioEngineImpl::play2d(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > const&, bool, float)+1088)
#00 pc 000000000092fbd8 /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so (cocos2d::experimental::AudioEngine::play2d(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > const&, bool, float, cocos2d::experimental::AudioProfile const*)+572)
#00 pc 00000000009346e8 /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so (CocosDenshion::android::AndroidJavaEngine::playEffect(char const*, bool, float, float, float)+296)
#00 pc 00000000006eb898 /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so (lua_cocos2dx_cocosdenshion_SimpleAudioEngine_playEffect(lua_State*)+620)
#00 pc 0000000000eb5530 /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so
#00 pc 0000000000e9f388 /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so (lua_pcall+152)
#00 pc 00000000005d8da4 /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so (cocos2d::LuaStack::executeFunction(int)+176)
#00 pc 00000000005d8ea0 /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so (cocos2d::LuaStack::executeFunctionByHandler(int, int)+72)
#00 pc 00000000005d72b0 /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so (cocos2d::LuaEngine::handleEventTouch(cocos2d::ScriptHandlerMgr::HandlerType, void*)+168)
#00 pc 000000000061208c /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so
#00 pc 00000000009041b4 /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so
#00 pc 00000000009000ac /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so (cocos2d::EventDispatcher::dispatchTouchEventToListeners(cocos2d::EventDispatcher::EventListenerVector*, std::__ndk1::function<bool (cocos2d::EventListener*)> const&)+468)
#00 pc 0000000000900848 /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so (cocos2d::EventDispatcher::dispatchTouchEvent(cocos2d::EventTouch*)+344)
#00 pc 00000000009004ac /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so (cocos2d::EventDispatcher::dispatchEvent(cocos2d::Event*)+228)
#00 pc 000000000087817c /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so (cocos2d::GLView::handleTouchesBegin(int, long*, float*, float*)+752)
#00 pc 00000000005d18cc /data/app/com.hd.happydays-1/lib/arm64/libcocos2dlua.so (Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeTouchesBegin+72)
#00 pc 000000000025df78 /data/dalvik-cache/arm64/data@app@com.hd.happydays-1@base.apk@classes.dex

3.17的安卓声音模块是不稳定的,建议你使用3.15.x的安卓声音模块,和3.17.2的IOS声音模块。这个坑我是踩过的,当初升级到3.17.2 安卓声音经常导致崩溃。我把安卓的声音退回到3.15的然后补了几个可能是稳定修复的补丁。现在就是稳定的了。 不过你需要修改下cmake(可能)