Open kakyoism opened 8 years ago
The workaround to Error #1 one above is only to fix the compilation error. You'll need a complete fix to avoid a crash on Android.
Go to my fork to get the complete fix: https://github.com/kakyoism/cocos2dx-IntegrationDemo
Tested and worked with Wwise v2015.1.6 on an Android 4.2 device.
I sent a pull request .
Environment:
Repro:
Error:
The compilation fails with the following error:
Diagnostics:
Workarounds:
For Error #1: Add this line to the proj.android/jni/Android.mk among the LOCAL_C_INCLUDES assignments:
LOCAL_C_INCLUDES += ${WWISESDK}/samples/SoundEngine/Android/libzip/lib
However, you'll soon run into linker error too. So you need to add libzip dependency into your makefile:
Add this to the end of your library module block:
Then add this to the end of your "LOCAL_STATIC_LIBRARIES" linker flag:
Don't forget to add the trailing "\" to the lib before it.
For Error #2: Remove the following line from the cocos2dx-demo code C:\Audiokinetic\Wwise_v2015.1.6_build_5553\SDK\samples\IntegrationDemo\cocos2d-x\Classes\WwiseWrapper.cpp:
Wwise::Instance().GetLowLevelIOHandler()->SetAssetManager((AAssetManager*)mgr);
Since AssetManager is now hidden to low-level I/O's client code, the proper fix would be to remove the AssetManager dependency from WwiseWrapper altogether.Finally, recompile the demo and you should be good to go.