Author Topic: BASS for Android  (Read 704196 times)

rrhh_fx

  • Posts: 21
Re: BASS for Android
« Reply #1850 on: 29 Mar '21 - 11:50 »
BASS_CONFIG_DEV_NONSTOP is disabled by default, so if you aren't changing that setting (via BASS_SetConfig) then that won't be what's causing the problem. But do check whether you're leaving the MIDI stream playing even when it's not playing any events, ie. call BASS_ChannelStop (or BASS_StreamFree) when it isn't in use.

The issue continue happening. BASS_CONFIG_DEV_NONSTOP have not changed, so as you said before, that shoult not be the cause. I have tried to stop all the streams when OnPause, also BASS_Pause (and resuming when onResume), also Bass_Stop() and Bass_Free() and when resuming having to initialize BASS (I know that it is not the best option, since it adds a lot of delay when initializing and loading resources). No much difference in Wake_Locks in all these tests. Around 0,3% of WakeLocks and the maximum value that Google considers acceptable is 0,1%. It is hard to obtain that WakeLock in tests, because it is a very low percenteage. Sometimes, I have noticed that when quitting the app and restarting, some ANR have been issued (and probably this WakeLock), if it is not stopped BASS before, and trying to Init again.  I appreciate any kind of help.

Ian @ un4seen

  • Administrator
  • Posts: 23550
Re: BASS for Android
« Reply #1851 on: 29 Mar '21 - 17:43 »
What BASS version are you currently using? If it's the release version, you could give the latest build/beta a try:

   www.un4seen.com/stuff/bass-android.zip

There have been some little tweaks to the inactive AAudio output stopping (when BASS_CONFIG_DEV_NONSTOP is disabled), which perhaps will help in your case.

rrhh_fx

  • Posts: 21
Re: BASS for Android
« Reply #1852 on: 29 Mar '21 - 18:07 »
What BASS version are you currently using? If it's the release version, you could give the latest build/beta a try:

   www.un4seen.com/stuff/bass-android.zip

There have been some little tweaks to the inactive AAudio output stopping (when BASS_CONFIG_DEV_NONSTOP is disabled), which perhaps will help in your case.

As you mention AAudio, I have just realised that the wakelocks only are affecting starting Android 8.0 and above (highest WakeLock rate in Android 8.0), and no wake locks in earlier Android versions.

Libbass version is dated 2019/12/17 and Libbasmidi is dated 2021/01/25 (both are release I think) . I will try the new version and will report here the results in a few days. Thanks
« Last Edit: 29 Mar '21 - 18:35 by rrhh_fx »

rrhh_fx

  • Posts: 21
Re: BASS for Android
« Reply #1853 on: 8 Apr '21 - 12:01 »
The first results from Wake Lock rate for the BASS beta version show that this value has decreased to a 0,02% of sessions, so it is a fine value :) Thanks!

Regarding previous post, I have to make a correction: when using BASS_Stop()  and BASS_Free() in OnPause in BASS release version, Wake Lock rate also is stablished in acceptable values, although I guess it is not the optimal solution, since it is very resources demanding if you change activities across the app frequently.

[EDIT] 2021/04/20: It's hard to analyze data from Google Play console, and even more hard to get data from different release versions, since it has a lot of delay in showing both values, but the beta finally seems to raise ANR rate and keep Wake Lock rate, so back to BASS release version again.
« Last Edit: 20 Apr '21 - 12:30 by rrhh_fx »

liuhen1001

  • Posts: 4
Re: BASS for Android
« Reply #1854 on: 30 Apr '21 - 07:37 »
Hi, I play a song on the SD card, and then I unplug the SD card, the program crashes. How can I fix this problem?

Ian @ un4seen

  • Administrator
  • Posts: 23550
Re: BASS for Android
« Reply #1855 on: 3 May '21 - 15:44 »
It appears that Android will automatically kill any app that's accessing the SD card when it's removed, ie. the app is killed rather than crashing. Do you not see the same thing happen with other apps?