axmolengine / axmol

Axmol Engine – A Multi-platform Engine for Desktop, XBOX (UWP) and Mobile games. (A fork of Cocos2d-x-4.0)
https://axmol.dev
MIT License
868 stars 195 forks source link

Android stuck partial wake locks - AudioMix #935

Closed qoozta closed 1 year ago

qoozta commented 1 year ago

It shows on Google Play vital details, after replacing cocos2d-x engine with axmol (axis / axys), this battery impact start showing up. Affected session is < 1% though.

Screenshot 2022-10-26 at 09 16 25

halx99 commented 1 year ago

The openal support two backends opensl, oboe on android platform, which backend do you use?

qoozta commented 1 year ago

The openal support two backends opensl, oboe on android platform, which backend do you use?

How to check it? I'm using all default settings.

halx99 commented 1 year ago

You can check the cmake output, default should be OpenSL

qoozta commented 1 year ago

You can check the cmake output, default should be OpenSL

I found in CMakeCache.txt, so using OpenSL.

//Enable OpenSL backend ALSOFT_BACKEND_OPENSL:BOOL=ON

//The Oboe include directory OBOE_INCLUDE_DIR:PATH=OBOE_INCLUDE_DIR-NOTFOUND

//The Oboe library OBOE_LIBRARY:FILEPATH=OBOE_LIBRARY-NOTFOUND

//Source directory for Oboe. OBOE_SOURCE:STRING=

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

aismann commented 1 year ago

@qoozta, Have you a example for reproducing? How can I use Google Play vital details?

qoozta commented 1 year ago

@qoozta, Have you a example for reproducing? How can I use Google Play vital details?

Sorry, I cannot provide an example because the apps are already on Play Store for sale. You can login to Google Play Console > select the app > Quality > Android Vitals > Overview, then scroll down and select Battery. We have multiple apps change from Cocos2dx-4 to Axmol all having the same vitals report.

halx99 commented 1 year ago

Latest upstream replace android audio backend from OpenSL to oboe for openal-soft, you can try it.

And a question: what the android version have this vitals report on your google play dashbaord?

qoozta commented 1 year ago

Latest upstream replace android audio backend from OpenSL to oboe for openal-soft, you can try it.

And a question: what the android version have this vitals report on your google play dashbaord?

I will have a try on the latest commit. As for the android version it mainly affect Android 8 and 9. Screenshot 2023-02-27 at 11 47 27

halx99 commented 1 year ago

The oboe will use AAudio on android 8+ devices

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.