Commit Graph

102 Commits

Author SHA1 Message Date
mmyduckx 9c0e425adb fix ios accelerometer not work (#11142)
* fix-ios-accelerometer not work

* remove all CC_TARGET_OS_TVOS related codes
2022-05-19 09:24:30 +08:00
timlyeee c7d6ba9e95 silentMode (#11022) 2022-05-11 10:54:58 +08:00
timlyeee 5e603b0fe1 [Fix bug] Play and pause audio in the same frame, the pause operation won't work on native (#10990) 2022-05-09 10:00:39 +08:00
timlyeee f175150b6c Cherry pick from v3.4.2 (#10182)
* supply a default context when surface destroyed (#4222)

* Fix loop audio would stop for ios system (#4254)

* IOS system has an uncertain state between foreground and background, and our condition sometimes miss the point to load buffers.
* Queue for 3 buffers might be too short to live, use 4 or even more instead.

* Use same mtx for write (#4220)
2022-02-25 13:52:31 +08:00
minggo f08555248f fix conflict 2022-01-24 17:23:03 +08:00
Yun Hsiao Wu 14a17c9d22 license upgrade (#4210) 2022-01-24 17:18:47 +08:00
oahcy 5379e6ef35 引擎适配linux平台 (#4035) 2021-11-29 17:17:15 +08:00
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
江战 5074a5a826 V3.4.0 usec++14 (#3898)
This reverts commit fff4cc8fc94fb9b1a8424a2b89e9966184c6c4ce.
2021-09-18 13:53:58 +08:00
minggo a61b2931dc merge v3.3.0 and fix conflict 2021-08-04 16:43:35 +08:00
PP c403ac3cdf fix audio crash on iOS (#3733) 2021-07-16 15:56:10 +08:00
minggo 2e364edd24 merge v3.2 to v3.3 2021-06-22 17:38:07 +08:00
江战 716b5d0d26 [3.3] fix compile error for Android NDK 22/23 (#3624) 2021-06-16 13:52:10 +08:00
minggo 102d524eac Merge pull request #3536 from minggo/merge_v32
Merge v32
2021-06-01 13:56:35 +08:00
江战 675f1bd064 unused function (#3582) 2021-06-01 11:30:26 +08:00
江战 1029bd2759 fix some bugs (#3581) 2021-05-28 18:39:14 +08:00
kenshin dc1f92e84c fix audio broken when do an phone call. (#3574) 2021-05-27 15:06:15 +08:00
江战 a652715f5a Harmony OS support - dont merge (#3528) 2021-05-21 10:43:22 +08:00
echoooooo 3d1909d365 fix: pause/resume should modify state (#3381) 2021-05-13 09:40:53 +08:00
mmyduckx 5ef2ab11bf Fix more warings (#3396) 2021-04-15 09:40:29 +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
Yun Hsiao Wu e0fdfef054 license upgrader 2021-02-05 14:08:22 +08:00
minggo 0386bed212 fix audio code format (#3212)
* fix audio code format

* format base files
2021-01-13 13:38:07 +08:00
PP 8afc47fcad sync audio bug fix (#2957)
* fix multiply register audioEngine onEnterBackground event

* fix audio engine crash when enter foreground

* fix CI
2020-11-25 14:30:14 +08:00
minggo dc43dba892 fix macro name (#3050) 2020-11-19 18:58:27 +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
江战 4c2b647bba remove CCPlatformConfig.h / 3d-gfx (#2555) 2020-06-12 11:17:37 +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
Arnold 79fc8353d1 3dgfx add CI & cmake (#2350)
* use-cmake

* revert: enable gles3 for android

* compile with cmake only
2020-04-14 13:58:45 +08:00
Arnold ce1cd53386 [gfx] win32 adaptation (#2270)
* update for windows

* update ref location

* update external

* revert debug info

* fix include order

* fix template

* fix buffer

* remove CCStdC-win32*
2020-03-18 11:35:40 +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
Arnold 68d18e3b51 [bugfix] win32 openal state assert failure (#1852)
* openal: protect play2d from incorrect state

stop playing in incorrect state

* Update cocos/audio/win32/AudioPlayer.cpp
2019-09-23 10:42:57 +08:00
minggo 95315c1a73 V2.1.3 update v8 android (#1817)
* use ndk's stl

* update external version: update v8
2019-08-30 17:37:58 +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
Arnold d88d4ffead Use smart pointers to hold references of global Application::_scheduler (#1732)
* use std::weak_ptr

* revert build/libcocos2d.vcxproj

* fix mac & ios & android

* declare variable in if block

* revert build/libcocos2d.vcxproj
2019-04-25 18:43:01 +08:00
Cocos Robot c56d468ef2 Sync branch v2.0-release to v2.1-release 2019-04-14 17:43:18 +08:00
knox 49373f1b6a alBufferData instead of alBufferDataStatic for small audio file on Apple 2019-04-09 18:05:27 +08:00