Commit Graph

56 Commits

Author SHA1 Message Date
qiuguohua eeb9d5c689 Merge the code of v3.3.1 platform adaptation layer into the development branch (#3958)
* 1、Merge platform adaptation layer code into the development branch
2、It passed the test in windows and ohos system

* 1、Merge platform adaptation layer code into the development branch
2、It passed the test in windows and ohos system

* 1、Fix github compile windows error

* 1、Fix github compile windows error

* 1. Adjust the code format;
2. Fix js automatic generation binding
3. Adjust github CI compilation

* 1. Adjust the code format;
2. Fix js automatic generation binding
3. Adjust github CI compilation

* Solve mac and ios compilation failure

* Fix the problem of compilation of Windows-side simulator

* 1. Adapt the simulator to a new adaptation layer;
2. Fix the compilation warning of ios, and the implicit conversion failed;
3. Fix the mac compilation error, due to the problem of adding the link identification -all_load;

* 1.Add the isDisplayStats and setDisplayStats method to the screen interface

* Fix clang-tidy compilation warning

* Fix clang-tidy compilation warning

* Repair the emulator, compatible with mac and win

* 1、Repair detailed errors, including name modification and calling method modification
2、Delete redundant files in the template directory
3、Change the vibrate interface to vibrator
4、Fix word spelling errors

* Rename interfaces to modules

* Replace CC_ASSERT with CCASSERT

* Replace CC_ASSERT with CCASSERT

Co-authored-by: qiuguohua <>
2021-10-27 10:51:02 +08:00
江战 716b5d0d26 [3.3] fix compile error for Android NDK 22/23 (#3624) 2021-06-16 13:52:10 +08:00
江战 a652715f5a Harmony OS support - dont merge (#3528) 2021-05-21 10:43:22 +08:00
minggo d8824f8a11 fix coding style (#3371) 2021-04-02 09:55:12 +08:00
Yun Hsiao Wu ea88ba33c6 codebase structure update (#3289)
* structure

* fix jsb auto binding license issue
2021-03-01 12:00:10 +08:00
minggo 0386bed212 fix audio code format (#3212)
* fix audio code format

* format base files
2021-01-13 13:38:07 +08:00
吴智明 4dc6a9f67c change android package name (#3006) 2020-11-11 10:55:10 +08:00
minggo 3fc5d1d76d 3d gfx use java activity (#2990)
* use java activity

* simplify codes

* initialize app

* first version of touch handler

* fix touch event's bug

* add keycode event support for android

* add sensor adapt

* add copyright header

* add webview support

* support video player

* add missing property

* add editor box support

* handle crash if come from background on Android

* update external version

Co-authored-by: wuzhiming <wuzhiming.chukong@gmail.com>
2020-11-07 17:38:33 +08:00
kenshin 2ad036ba09 3d gfx 2 4 3 patch (#2984)
* free AudioMix partial wake locks, and android device can enter power save

* fix audio engine crash, avoid update function reentrancy.

* fix hot update issue.

* avoid a NULL point crash when ScriptEngine::cleanup
2020-11-06 18:03:49 +08:00
minggo 9d9c79012b change file path (#2733) 2020-09-10 09:51:24 +08:00
minggo b08407c501 remove CC/cc prefix for file names (#2728) 2020-08-28 15:23:29 +08:00
minggo 4d889c7ae7 use CC_DEBUG instead (#2718) 2020-08-25 11:58:13 +08:00
minggo 7efee066fd Remove duplicate (#2597) 2020-06-19 11:07:21 +08:00
minggo d381a16142 change namespace from cocos2d to cc (#2572) 2020-06-16 14:34:46 +08:00
江战 082f432d2a remove unused code / 3dgfx (#2487)
* remove \*.mk

* support Makefile

* update default template

* fix path

* fix field type

* link resource instead of copy

* update external

* fix travis

* fix ssize_t macro

* fix macro 2
2020-05-28 11:24:14 +08:00
minggo 96cbe1e971 Android adapt (#2410)
* simplify get obb file path

* not get package name throung jni

* not get sdk version from android

* remove unneeded codes

* remove convertEncoding

* remove unneeded codes'

* remove unneeded codes

* simpify codes

* simplify codes

* remove unneeded codes
2020-04-27 17:14:06 +08:00
minggo e693d0a237 get audio output sample rate and output frame count in C++ (#2175) 2020-02-24 18:14:00 +08:00
minggo 1bb0c717d0 fix macro redefine warning of platform defination (#2099) 2020-01-20 15:12:49 +08:00
PP 0ab1197c27 refine pause playing audio when enter background (#1875)
* Revert "Pause music when app enter background (#1849)"

This reverts commit 7a24ee3377.

* refine pause playing audio when enter background
2019-10-12 17:02:50 +08:00
PP ab086f619e correct max audio instance on Android (#1869) 2019-10-10 19:41:25 +08:00
minggo 39f4b68302 V8 fix (#1816)
* use ndk's stl

* update external version: update v8
2019-08-30 17:24:54 +08:00
minggo 57fd102dd5 fix compling error on android x86 2019-07-26 11:34:57 +08:00
minggo fbc69aebeb can build and run on android, but will crash 2019-07-12 10:36:21 +08:00
Javier O 4e79585fd0 Improved audio engine interface to get the audio duration directly from the filename
because with the current implementation the audio needs to be preload and at least be played one time to get
the audio id which is needed to get the audio duration with the current getDuration API.
I've describes the problem in detail here:
https://discuss.cocos2d-x.org/t/audioengine-interface-improvement/34034
2019-02-28 09:18:14 -03:00
jimmy 16a5082bd9 修正音乐文件不在OBB时无法加载的bug (#1611) 2019-01-28 10:05:07 +08:00
leda dada2eb244 move "cocos2d::experimental::" to "cocos2d::" on Audio (#1549)
* remove “experimental” in audio dir

* update audio bindings

* fix "{" match error

* no need "experimental" for thread pool

* remove both out-of-date js api files
2018-10-18 13:34:12 +08:00
minggo b642e0fcc7 Merge branch 'v2.0-release-rename' of github.com:cocos-creator/cocos2d-x-lite into merge-rename 2018-08-28 14:39:40 +08:00
W-MTZing 935a759cf4 rename c++ call java function by macro (#1468) 2018-08-22 14:07:17 +08:00
leda 3873d01bdd fix depend error on application.h (#1458)
* correct event type

* move isDisplayStats Impl from header to source file

* correct header file depend for application-ios

* same header changes on win32
2018-08-16 13:34:36 +08:00
leda 19ab61b252 refine TODO & FIXME flag (#1450)
* change TODO to REFINE

* change REFINE:cjh to REFINE

* change FIXME to IDEA

* improve format
2018-08-10 12:52:00 +08:00
James Chen 2e174ff1c2 Supports dispatching custom event for EventDispatcher. (#1240)
* Adds __jsbInvocationCount for SpiderMonkey.

* Supports dispatching custom event for EventDispatcher.
2018-05-14 17:19:03 +08:00
James Chen bf1b4f7124 [runtime] Audio works. (#1151) 2018-03-17 11:22:56 +08:00
Jare Guo d9bd3d763c update license (#1089)
* updating license

* update license
2018-02-01 15:20:01 +08:00
James Chen 8bb98375f7 Fixes missing return value of onWavClose function. (#1025) 2017-12-08 21:47:23 +08:00
James Chen 2e3883f097 [Android] Fixed compilation error while using APP_PLATFORM >= 22. (#1012)
* [Android] Fixed compilation error while using APP_PLATFORM >= 22.

* Don't use deprecated createUint8TypedArray.
2017-11-23 15:19:37 +08:00
Jare Guo 1ea2fc1715 revert TextureCache, use ThreadPool instead 2017-09-26 10:18:01 +08:00
James Chen 753c1fa352 Updates cocos2d-console and a warning fix in UrlAudioPlayer.cpp 2017-09-21 09:38:07 +08:00
James Chen 6ee832bbc0 Removes unused SimpleAudioEngine relative files. 2017-09-08 10:03:09 +08:00
James Chen e98823839c Sync audio module from cocos2d-x. 2017-09-08 09:56:29 +08:00
James Chen 7653cb453f Merge branch 'develop' of git://github.com/cocos-creator/cocos2d-x-lite into jsb2.0
# Conflicts:
#	build/cocos2d_libs.xcodeproj/project.pbxproj
#	cocos/2d/libcocos2d.vcxproj.filters
#	cocos/Android.mk
#	cocos/editor-support/creator/CCCameraNode.cpp
#	cocos/editor-support/creator/physics/CCPhysicsAABBQueryCallback.cpp
#	cocos/editor-support/creator/physics/CCPhysicsAABBQueryCallback.h
#	cocos/network/SocketIO.cpp
#	cocos/network/WebSocket-libwebsockets.cpp
#	cocos/renderer/CCTextureCache.cpp
#	cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js
#	cocos/scripting/js-bindings/auto/jsb_box2d_auto.cpp
#	cocos/scripting/js-bindings/auto/jsb_box2d_auto.hpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_audioengine_auto.cpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_audioengine_auto.hpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.hpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_dragonbones_auto.cpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_dragonbones_auto.hpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_video_auto.cpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_video_auto.hpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.cpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_webView_auto.hpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.cpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.hpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_network_auto.cpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_network_auto.hpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.cpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.hpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.cpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_ui_auto.hpp
#	cocos/scripting/js-bindings/auto/jsb_creator_auto.cpp
#	cocos/scripting/js-bindings/auto/jsb_creator_auto.hpp
#	cocos/scripting/js-bindings/manual/JavaScriptJavaBridge.h
#	cocos/scripting/js-bindings/manual/JavaScriptObjCBridge.h
#	cocos/scripting/js-bindings/manual/ScriptingCore.cpp
#	cocos/scripting/js-bindings/manual/ScriptingCore.h
#	cocos/scripting/js-bindings/manual/box2d/js_bindings_box2d_manual.cpp
#	cocos/scripting/js-bindings/manual/box2d/js_bindings_box2d_manual.h
#	cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp
#	cocos/scripting/js-bindings/manual/cocos2d_specifics.hpp
#	cocos/scripting/js-bindings/manual/creator/js_bindings_creator_manual.cpp
#	cocos/scripting/js-bindings/manual/dragonbones/jsb_cocos2dx_dragonbones_manual.cpp
#	cocos/scripting/js-bindings/manual/dragonbones/jsb_cocos2dx_dragonbones_manual.h
#	cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_video_manual.cpp
#	cocos/scripting/js-bindings/manual/experimental/jsb_cocos2dx_experimental_webView_manual.cpp
#	cocos/scripting/js-bindings/manual/extension/jsb_cocos2dx_extension_manual.cpp
#	cocos/scripting/js-bindings/manual/js_bindings_config.h
#	cocos/scripting/js-bindings/manual/js_bindings_opengl.cpp
#	cocos/scripting/js-bindings/manual/js_manual_conversions.cpp
#	cocos/scripting/js-bindings/manual/js_manual_conversions.h
#	cocos/scripting/js-bindings/manual/js_module_register.cpp
#	cocos/scripting/js-bindings/manual/js_module_register.h
#	cocos/scripting/js-bindings/manual/jsb_event_dispatcher_manual.cpp
#	cocos/scripting/js-bindings/manual/jsb_event_dispatcher_manual.h
#	cocos/scripting/js-bindings/manual/jsb_helper.h
#	cocos/scripting/js-bindings/manual/jsb_opengl_functions.cpp
#	cocos/scripting/js-bindings/manual/jsb_opengl_functions.h
#	cocos/scripting/js-bindings/manual/jsb_opengl_manual.cpp
#	cocos/scripting/js-bindings/manual/jsb_opengl_manual.h
#	cocos/scripting/js-bindings/manual/jsb_opengl_registration.cpp
#	cocos/scripting/js-bindings/manual/localstorage/js_bindings_system_functions.cpp
#	cocos/scripting/js-bindings/manual/localstorage/js_bindings_system_functions.h
#	cocos/scripting/js-bindings/manual/localstorage/js_bindings_system_registration.cpp
#	cocos/scripting/js-bindings/manual/network/XMLHTTPRequest.cpp
#	cocos/scripting/js-bindings/manual/network/js_network_manual.cpp
#	cocos/scripting/js-bindings/manual/network/js_network_manual.h
#	cocos/scripting/js-bindings/manual/network/jsb_socketio.cpp
#	cocos/scripting/js-bindings/manual/network/jsb_websocket.cpp
#	cocos/scripting/js-bindings/manual/platform/android/CCJavascriptJavaBridge.cpp
#	cocos/scripting/js-bindings/manual/platform/android/CCJavascriptJavaBridge.h
#	cocos/scripting/js-bindings/manual/platform/ios/JavaScriptObjCBridge.h
#	cocos/scripting/js-bindings/manual/platform/ios/JavaScriptObjCBridge.mm
#	cocos/scripting/js-bindings/manual/spidermonkey_specifics.h
#	cocos/scripting/js-bindings/manual/spine/jsb_cocos2dx_spine_manual.cpp
#	cocos/scripting/js-bindings/manual/spine/jsb_cocos2dx_spine_manual.h
#	cocos/scripting/js-bindings/manual/ui/jsb_cocos2dx_ui_manual.cpp
#	cocos/scripting/js-bindings/proj.android/Android.mk
#	cocos/scripting/js-bindings/proj.ios_mac/cocos2d_js_bindings.xcodeproj/project.pbxproj
#	cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj
#	cocos/scripting/js-bindings/proj.win32/libjscocos2d.vcxproj.filters
#	cocos/scripting/js-bindings/script/jsb_boot.js
#	tools/bindings-generator
#	tools/tojs/cocos2dx.ini
#	tools/tojs/genbindings.py
2017-08-10 18:04:24 +08:00
James Chen ec159591d0 removes unused functions in bitops.h 2017-08-10 16:55:25 +08:00
pandamicro 807854ee7a Remove SimpleAudioEngine dependency on android 2017-07-12 16:16:38 +08:00
James Chen 8906d53f04 Sync cocos2d-x #17923 2017-06-13 17:47:36 +08:00
James Chen fc98b4bdc0 Sync with cocos2d-x v3 branch ddb4dc8 commit. 2017-04-24 10:49:02 +08:00
James Chen 5013c73f01 warning fix 2017-01-20 16:44:00 +08:00
James Chen 4934a40346 warning fix 2017-01-09 18:10:38 +08:00
James Chen 93add3f0df [android] Compilation pass on armeabi, armeabi-v7a, arm64-v8a. 2017-01-09 18:06:59 +08:00
James Chen e6aefcea4b Updates tags 2017-01-09 17:50:30 +08:00
James Chen 1ffd82c4a3 [Android] Decodes mp3 & ogg audio file by the libaries in Android 7.1 source code. Benefit:
* Avoids crashes on some specific android devices (e.g. Red Mi Note4) while decoding audio file in multi-threads.
* Improves performance of decoding, 2x faster
2017-01-09 17:45:55 +08:00
James Chen 725aa66556 Updates lite audio engine sources from upstream (cocos2d-x). 2016-10-28 11:30:29 +08:00