Author Topic: BASS for Android  (Read 367512 times)

Ionut Cristea

  • Posts: 1545
Re: BASS for Android
« Reply #1250 on: 12 Mar '17 - 18:52 »
  Hello Ian,

Code: [Select]
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'xiaomi/mido/mido:6.0.1/MMB29M/V8.1.15.0.MCFMIDI:user/release-keys'
Revision: '0'
ABI: 'arm'
pid: 2462, tid: 3056, name: Thread-1135 >>> com.surodev.suamp <<<
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x37313032
r0 37313032 r1 00000000 r2 00000000 r3 ffffffff
r4 37313032 r5 00000000 r6 00000000 r7 d9f5af28
r8 00000028 r9 00000000 sl 000003e8 fp abc6cbe8
ip f6ca7e40 sp d9f5ab18 lr f6d0ff83 pc f6d0ff16 cpsr 600e0030

backtrace:
#00 pc 00066f16 /system/lib/libcrypto.so
#01 pc 00066f7f /system/lib/libcrypto.so (X509_VERIFY_PARAM_free+6)
#02 pc 000182d7 /system/lib/libssl.so (SSL_free+10)
#03 pc 00011b09 /data/app/com.surodev.suamp-2/lib/arm/libbass.so
#04 pc 000123cf /data/app/com.surodev.suamp-2/lib/arm/libbass.so
#05 pc 0001a847 /data/app/com.surodev.suamp-2/lib/arm/libbass.so
#06 pc 0002776b /data/app/com.surodev.suamp-2/lib/arm/libbass.so (BASS_StreamCreateURL+62)
#07 pc 000278bf /data/app/com.surodev.suamp-2/lib/arm/libbass.so (Java_com_un4seen_bass_BASS_BASS_1StreamCreateURL+58)
#08 pc 00ef37d3 /data/app/com.surodev.suamp-2/oat/arm/base.odex (offset 0x8d1000)

Happens while trying to open a https stream in Android 6.0.

Best regards,
Ionut Cristea

Ian @ un4seen

  • Administrator
  • Posts: 20063
Re: BASS for Android
« Reply #1251 on: 13 Mar '17 - 16:25 »
What BASS version are you using, ie. what does BASS_GetVersion return? If it isn't the latest, please try upgrading and see if you still have the problem then.

Ian @ un4seen

  • Administrator
  • Posts: 20063
Re: BASS for Android
« Reply #1252 on: 31 Mar '17 - 15:07 »
The Android version of the BASSMIDI 2.4.11 release is now up in the 1st post.

diystar

  • Posts: 40
Re: BASS for Android
« Reply #1253 on: 17 Apr '17 - 12:07 »
How to change the aodio API from OpenSL to AudioTrack? Now Bass Lib causes white noise on Android 6.0 (I uses Delphi 10.1). When i uses TMediaPlayer, no noise arises.

Ian @ un4seen

  • Administrator
  • Posts: 20063
Re: BASS for Android
« Reply #1254 on: 17 Apr '17 - 16:31 »
Here's some code for using AudioTrack output:

   www.un4seen.com/forum/?topic=13225.msg118003#msg118003

You can also search for "AudioTrack" in this thread (using the box in the top-right) to find more code snippets.

Regarding the noise problem you're having with the Android 6 device, does using the BASS_DEVICE_16BITS flag in your BASS_Init call make any difference?

diystar

  • Posts: 40
Re: BASS for Android
« Reply #1255 on: 18 Apr '17 - 11:39 »
When i uses the BASS_DEVICE_16BITS flag, no noise arises again. Recommends to use the BASS_DEVICE_16BITS flag for default.

diystar

  • Posts: 40
Re: BASS for Android
« Reply #1256 on: 5 May '17 - 05:22 »
When i uses the BASS_DEVICE_16BITS flag, foreground playback has no noise, but background playback still has noise. Delphi TMediaPlayer background playback has no noise. Can you define a multi-thread flag for playback? Or how can i let Bass to play audio in a thread?

Ian @ un4seen

  • Administrator
  • Posts: 20063
Re: BASS for Android
« Reply #1257 on: 5 May '17 - 13:55 »
What sort of noise are you hearing, eg. is it distortion or is it clicks/gaps? If the latter, it may be that your app isn't getting enough CPU (background apps have lower priority). You can avoid that by implementing a "foreground service":

   www.un4seen.com/forum/?topic=13225.msg99418#msg99418

diystar

  • Posts: 40
Re: BASS for Android
« Reply #1258 on: 6 May '17 - 06:45 »
But i am not familiar with java :(. In any case, i will try it.

Wesley

  • Guest
Re: BASS for Android
« Reply #1259 on: 10 May '17 - 13:16 »
Hello Ian,

I'm facing an error with https url for streaming, returning error 10 (BASS_ERROR_SSL).
Not working from Android 6.0 to 7.1.

I downloaded the last version, but this error isn't fixed.
(Using libbass, libbass_aac and libbasshls).


Ian @ un4seen

  • Administrator
  • Posts: 20063
Re: BASS for Android
« Reply #1260 on: 10 May '17 - 17:23 »
That sounds like a supported SSL library (libssl or libboringssl) isn't present on those devices. What devices are you having the problem with? To confirm what libraries are available on them, please run this code on them:

Code: [Select]
File[] list=new File("/system/lib").listFiles();
for (int i=0; i<list.length; i++) {
Log.d("filelist", list[i].getName() + " = " + list[i].length());
}

Then go to the LogCat window, set the filter to "tag:filelist", and save the list to a file. Then post that (or send them to me if you prefer).

diystar

  • Posts: 40
Re: BASS for Android
« Reply #1261 on: 14 May '17 - 01:44 »
Hopes to provide a Bass edition used AudioTrack API directly!

chadr

  • Guest
Re: BASS for Android
« Reply #1262 on: 15 May '17 - 14:42 »
I need the arm64 bass and add-ons(bassfx, bassmix) for android.
Can you support arm64 for android officially?

Ian @ un4seen

  • Administrator
  • Posts: 20063
Re: BASS for Android
« Reply #1263 on: 15 May '17 - 17:49 »
An ARM64 version of the BASS library is available (here), but no add-ons are currently available. Are you sure you really need ARM64 libraries? Note that ARM64 devices also support the ARMv7 architecture.

chadr

  • Guest
Re: BASS for Android
« Reply #1264 on: 16 May '17 - 14:32 »
An ARM64 version of the BASS library is available (here), but no add-ons are currently available. Are you sure you really need ARM64 libraries? Note that ARM64 devices also support the ARMv7 architecture.

Yes. I need it.

My app needs high performance because of it is video player.
I know you said that arm64 also support the armv7. But because of performance issue, I decide to support arm64 for my app.
To do that I need arm64 version of bass and bass add-ons.

Can you support the arm64 of bass and bass add-ons officially?
If it possible, I am very very thank you. :)

Ian @ un4seen

  • Administrator
  • Posts: 20063
Re: BASS for Android
« Reply #1265 on: 17 May '17 - 16:34 »
If you only need arm64 versions of the BASSmix and BASS_FX add-ons, then perhaps that can be arranged. I will check with the BASS_FX developer.

chadr

  • Guest
Re: BASS for Android
« Reply #1266 on: 18 May '17 - 13:38 »
If you only need arm64 versions of the BASSmix and BASS_FX add-ons, then perhaps that can be arranged. I will check with the BASS_FX developer.

Thank you very much!!

Ian @ un4seen

  • Administrator
  • Posts: 20063
Re: BASS for Android
« Reply #1267 on: 18 May '17 - 14:55 »
The BASSmix add-on has now been added to the arm64 BASS package (the BASS library is also updated to the latest version):

   www.un4seen.com/stuff/bass24-android-arm64.zip

And the arm64 BASS_FX add-on is available here:

   www.un4seen.com/files/z/0/bass_fx24-android-arm64.zip

Ian @ un4seen

  • Administrator
  • Posts: 20063
Re: BASS for Android
« Reply #1268 on: 18 May '17 - 14:56 »
A BASS update that adds support for using Android's built-in codecs is now up in the 1st post.

Ionut Cristea

  • Posts: 1545
Re: BASS for Android
« Reply #1269 on: 19 May '17 - 05:07 »
Hello,

Code: [Select]

"main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 obj=0x75a8a718 self=0xe5805400
  | sysTid=19607 nice=-4 cgrp=default sched=0/0 handle=0xe8e05534
  | state=S schedstat=( 0 0 0 ) utm=4080 stm=525 core=2 HZ=100
  | stack=0xff754000-0xff756000 stackSize=8MB
  | held mutexes=
  native: pc 0000000000017520  /system/lib/libc.so (syscall+28)
  native: pc 0000000000047cbd  /system/lib/libc.so (_ZL33__pthread_mutex_lock_with_timeoutP24pthread_mutex_internal_tbPK8timespec+520)
  native: pc 000000000000b32f  /data/app/com.surodev.suamp-2/lib/arm/libbass.so (???)
  native: pc 000000000001c1ef  /data/app/com.surodev.suamp-2/lib/arm/libbass.so (???)
  native: pc 000000000001e3d1  /data/app/com.surodev.suamp-2/lib/arm/libbass.so (BASS_StreamFree+14)
  native: pc 000000000001e3ed  /data/app/com.surodev.suamp-2/lib/arm/libbass.so (Java_com_un4seen_bass_BASS_BASS_1StreamFree+4)
  native: pc 000000000008fe85  /data/app/com.surodev.suamp-2/oat/arm/base.odex (Java_com_un4seen_bass_BASS_BASS_1StreamFree__I+80)
  at com.un4seen.bass.BASS.BASS_StreamFree (Native method)
although is not the latest bass version included.

Ian @ un4seen

  • Administrator
  • Posts: 20063
Re: BASS for Android
« Reply #1270 on: 19 May '17 - 17:22 »
That looks like there was a crash in a BASS_StreamFree call. If you aren't currently using the latest BASS version, please first try that. If you can still reproduce the problem then, and it's a file stream, please upload the file to have a look at here:

   ftp.un4seen.com/incoming/

Ionut Cristea

  • Posts: 1545
Re: BASS for Android
« Reply #1271 on: 20 May '17 - 22:22 »
Latest version of bass seem to fix that. Also this anr occurred when calling bass_fx reverb effect.

Code: [Select]

"main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 obj=0x738812a0 self=0xb7a1de78
  | sysTid=26058 nice=-4 cgrp=default sched=0/0 handle=0xb6f3eb34
  | state=S schedstat=( 7708415107 2850398577 12581 ) utm=660 stm=110 core=2 HZ=100
  | stack=0xbe4de000-0xbe4e0000 stackSize=8MB
  | held mutexes=
  native: pc 00000000000169b8  /system/lib/libc.so (syscall+28)
  native: pc 0000000000042327  /system/lib/libc.so (_ZL33__pthread_mutex_lock_with_timeoutP24pthread_mutex_internal_tPK8timespeci+326)
  native: pc 00000000000424dd  /system/lib/libc.so (pthread_mutex_lock+26)
  native: pc 000000000000ec95  /data/app/com.surodev.suamp-2/lib/arm/libbass.so (???)
  native: pc 00000000000130a7  /data/app/com.surodev.suamp-2/lib/arm/libbass.so (Java_com_un4seen_bass_BASS_BASS_1FXSetParameters+12)
  native: pc 00000000006501d9  /data/app/com.surodev.suamp-2/oat/arm/base.odex (Java_com_un4seen_bass_BASS_BASS_1FXSetParameters__ILjava_lang_Object_2+100)
  at com.un4seen.bass.BASS.BASS_FXSetParameters (Native method)
  at com.surodev.suamp.Player.setReverb (Player.java:242)
  at com.surodev.suamp.fragments.AudioEffectsFragment.update

Ian @ un4seen

  • Administrator
  • Posts: 20063
Re: BASS for Android
« Reply #1272 on: 22 May '17 - 16:53 »
Are you able to reproduce the problem? If so, please post the BASS_FXSetParameters call (including parameters), and also the effect's BASS_ChannelSetFX call.

Ionut Cristea

  • Posts: 1545
Re: BASS for Android
« Reply #1273 on: 23 May '17 - 16:43 »
 I wasn't able to reproduce the problem, it was only reported by play store stats

diystar

  • Posts: 40
Re: BASS for Android
« Reply #1274 on: 24 May '17 - 06:16 »
With Android 4.1 or above, BASS can make use of Android's built-in codecs. Different devices will have different codecs available, but AAC and FLAC will generally be supported by all. Other formats that may be supported include ALAC/APE/MIDI/OPUS.
How to get all Android's built-in audio types?