Commit Graph

47 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
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
PP c403ac3cdf fix audio crash on iOS (#3733) 2021-07-16 15:56:10 +08:00
minggo 102d524eac Merge pull request #3536 from minggo/merge_v32
Merge v32
2021-06-01 13:56:35 +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
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
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 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 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
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
minggo 1bb0c717d0 fix macro redefine warning of platform defination (#2099) 2020-01-20 15:12:49 +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
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
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
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 1edc19dd3d Custom ttf font works on iOS/macOS (#1154)
* Custom ttf font works.

* Remove unused log.

* better code logic, less if .

* comment debugging code.
2018-03-20 14:51:24 +08:00
James Chen bf1b4f7124 [runtime] Audio works. (#1151) 2018-03-17 11:22:56 +08:00
minggo c4c24c9d54 windows works with new renderer (#1137) 2018-03-07 14:31:46 +08:00
Jare Guo d9bd3d763c update license (#1089)
* updating license

* update license
2018-02-01 15:20:01 +08:00
James Chen e98823839c Sync audio module from cocos2d-x. 2017-09-08 09:56:29 +08:00
James Chen e026c60b4e Sync bug fix: https://github.com/cocos2d/cocos2d-x/pull/18083 2017-07-19 10:37:06 +08:00
James Chen e060ea3e77 fixed #17800: [iOS] Streaming audio (normally a background music) maybe cut and may not be looped.
Sync PR https://github.com/cocos2d/cocos2d-x/pull/17947
2017-06-20 10:31:19 +08:00
James Chen 4edd40c5b4 Call 'update' method in 'stop/stopAll' to cleanup immediately 2017-05-22 09:45:49 +08:00
James Chen fc98b4bdc0 Sync with cocos2d-x v3 branch ddb4dc8 commit. 2017-04-24 10:49:02 +08:00
James Chen b9f5f877d2 [mac, ios] Sync bug fix from https://github.com/cocos2d/cocos2d-x/pull/17011 2016-12-20 15:10:42 +08:00
James Chen f33abbaa74 Updates license years and deletes tailing white spaces. 2016-12-02 10:22:49 +08:00
James Chen 51a5cda2b7 Sync Pull Request https://github.com/cocos2d/cocos2d-x/pull/16946 2016-12-02 10:06:22 +08:00
pandamicro 8bd0b63d83 Upgrade cocos/audio to v3.13 2016-08-04 12:01:26 +08:00
minggo 675436984e fix compiling error 2016-07-19 07:46:09 +08:00
minggo 896ae381aa fix bug that AudioEngine can not work if file path contains non ascii codes 2016-07-18 17:33:17 +08:00
Wenhai Lin 754fae9afc Not support iOS below version 7 2016-04-07 15:53:38 +08:00
Wenhai Lin 9dffef8763 Using 'using' instead of 'typedef' 2016-04-07 15:47:05 +08:00
Wenhai Lin 0e7cb5da16 no more uthash 2016-04-07 11:33:04 +08:00
Wenhai Lin 94c95d5838 Withespaces does matter. 2016-03-31 23:50:02 +08:00
Wenhai Lin a6dbf31dcf cocos 2d lite version 2016-03-29 17:55:48 +08:00