BackgroundAfter sending a beta out with the new Gideros version (2016.8.1), I received report of top battery usage, even when the app was started and not used (stays in the background).
The IssueSure enough, when I run and "ADB shell top -m 10" and launch my app (or just the GiderosAndroidPlayer) and return to the home screen so the app is in the background,
it consumes 3-5% of cpu along with the /system/bin/mediaserver consuming a similar amount.
Each Gideros app running in the background consumes an additional 3-4% of cpu in the mediaserver.
I then tested on the previous version (2016.4) and it was fine. So it is new with this release and related to mediaserver.
EDIT: This happens in GiderosAndroidPlayer
without executing any LUA code. Just open the GiderosAndroidPlayer, see the white screen, then return to the phone home screen and the issue presents itself.
The CausePerhaps the new audio framework has a bug whereby the app isn't properly "pausing/stopping" the audio related threads when the app is in the background?
Work AroundTo get around this, I may have to have the app listen to being set to background and kill itself after X seconds. But it would still be good to get this resolved soon!
Comments
mp3 sounds -> mediaserver
wav files (pcm) -> openal -> opensl es
Is the sound you are playing an mp3 or a wav?
Have you set it to repeat?
https://deluxepixel.com
https://deluxepixel.com
https://deluxepixel.com
1. This is happening even when you just open the GiderosAndroidPlayer without executing any LUA code.
2. This is also happening on exported Android projects.
@SinisterSoft, glad to hear something was found
I just made an Android player with a possible fix in it. Can you try and report back here ?
If it is ok I'll push the fix on github for next release.
Here is the modified player: http://hieroglyphe.net/gideros/GiderosAndroidPlayer.apk
https://deluxepixel.com
Likes: SinisterSoft