* fixed#17685: [android] Audio in game couldn't be mute while a ring or a call is coming
* Updates comments in AudioEngine-inl.cpp and removes extra empty line in javaactivity-android.cpp
* Puts audio focus relative code to another java file named Cocos2dxAudioFocusManager.java
Renames setAudioFocusLost to setAudioFocus.
* Renames JNI function.
* Register audio focus in onResume and unregister it in onPause.
* Moves the implementation of AudioEngine::AudioInfo to cpp file.
* fixed#17591: [ios, mac, win32] Audio could not be played in the callback of AudioEngine::setFinishedCallback
* fixed#17591: Adds test case.
* fixed#17494: Adds setTimeout to wrap NSTimer since ‘timerWithTimeInterval:repeats:block’ is only available from iOS 10, macOS 10.12.
* Sets _timeoutCallback to nullptr if onTimeoutCallback is called.
* [Android] Software decoding while preloading audio files to avoid some crashes on some specific android devices, and it’s 2x faster than the old implementation.
* Updates external/config.json to 126
* Updates library path, adds ‘android-specific’ prefix.
* Updates config.json to 127
* Fix various compilation issues.
Mostly errors on field initialization order but also missing files
in CMakeLists and missing include directives.
* Fix compilations issues with GCC 6.2
* Fix gitignore libs/ entry to not ignore the Android external libraries.
* fixed#16849: Preload many audios may cause crash on devices those use Samsung Exynos CPU.
* Adds comment for __SLPlayerMutex variable.
* Fixes wrong comments in AudioDecoder.cpp
* [mac, ios] Adds AudioDecoder::readFixedFrames. And uses readFixedFrames to simply code.
* [mac, ios] ‘ExtAudioFileRead’ may return 0 frame while it doesn’t reach the end of very short audio file.
* [mac, ios] Adds test case for small file test.
* [mac, ios] Adds small audio file.
* [mac, ios] Macro ‘BREAK_IF’ logic fix.
* [mac, ios] Returns false of AudioDecoder::open if total frames is 0.
* fixed#16938: Audio could not be played entirely on iOS/macOS. And refactored some code of decoding.
* Adds license header, removes unused macros.
* issue #16938: Corrects remaining frame count calculation.
* Updates include path.
* Adds comments for AudioDecoder class.
* Adds const for getter functions in AudioDecoder.
* issue #16938: Adds test case.
* Updates license years.
* Deletes trailing white spaces.
* fixed#16754: [android] Background music which is playing could not be paused while game enters background.
* Updates a comment of cocos/audio/android/AudioEngine-inl.h
* Use range-based for-loops and allocate std::vector size(), end(), cend(), rend(), crend() on the stack where favorable.
Other minor trivial changes were applied.
* Fixed Android compilation error
* Fixed windows-universal compilation error
* Support audio interruption and resume callback when change earphone status.
* Refactor keyevent callback and add makecurrent for compatible with different binary.
* Enable Tizen indicator.
* Remove the unnecessary evasobject in the window and refactor the function for glview mode.
* Fix the compatible issue between Tizen 2.3 and 2.4.
* Fix the wrong directory of script resources for HellLua template project.
* Create performance-test project for Tizen platform.
* Use ++ prefix instead for non-primitive data types in CCAutoPolygon.cpp
* Use ++ prefix instead for non-primitive data types in SimpleAudioEngine.cpp
* Use ++ prefix instead for non-primitive data types in CCNodeLoaderLibrary.cpp
* Use ++ prefix instead for non-primitive data types in CCActionManagerEx.cpp
* Use ++ prefix instead for non-primitive data types in CCDataReaderHelper.cpp
* Use ++ prefix instead for non-primitive data types in HttpClient-android.cpp
* Use ++ prefix instead for non-primitive data types in CCDevice-linux.cpp
* Use ++ prefix instead for non-primitive data types in ScriptingCore.cpp
* Switched implementation to range-based for loops
* Added readability, fixed loop in CCDataReaderHelper.cpp
Thanks to Dimon4eg for the code review.
If playing a large audio and its loop flag is set to false, after the audio is played over, there will be 4 or 8 bytes memory leak by _rotateBufferThread variable.
Resolution:
The `isDestroy` flag should not be set to true in rotate buffer thread, to exiting the thread, we need another varible for this purpose.
Thanks @nicolechen819 for the feedback.
* Warning fixes in AudioDecoder.cpp
* AudioPauseResumeAfterPlay test case should start in onEnter.
And add a loop to pause & resume many times.
* AudioMixerController::initTrack should not setState for track. Otherwise, it may trigger Track state mess-up.