Author Topic: BASS for Android  (Read 696325 times)

firemen

  • Posts: 156
Re: BASS for Android
« Reply #1750 on: 1 Jul '20 - 08:34 »
please check the 64 bit version of the android midi library.
there is no sound when playing midi. the SF2 bank is loaded without errors. or maybe there are some nuances?

with 32 bit compilation of an application with a 32 bit midi library everything works fine.


Code: [Select]
var
  sf  : BASS_MIDI_FONT;
  fStream  : HSTREAM;
  fSoundfont : HSOUNDFONT;
  DocumentPath : string;

begin

  DocumentPath:= IncludeTrailingPathDelimiter(System.IOUtils.TPath.GetDocumentsPath);

  if not BASS_Init(-1, 44100, BASS_DEVICE_DEFAULT, 0, nil) then ShowMessage('Error initializing audio!');

  fSoundfont := BASS_MIDI_FontInit(PChar(DocumentPath + 'myfonts.sf2'), BASS_UNICODE);

  if (fSoundfont = 0) then ShowMessage('Error font init!');

  sf.font := fSoundfont; sf.preset:= -1;  sf.bank:= 0;

  if not BASS_MIDI_StreamSetFonts(0, PBASS_MIDI_FONT(@SF), 1) then ShowMessage('Error set fonts!');

  fStream := BASS_MIDI_StreamCreateFile(false, PChar(DocumentPath + 'test.kar'), 0, 0, BASS_UNICODE, 1);

  if (fStream = 0) then ShowMessage('Error open kar!');

  if not BASS_ChannelPlay(fStream, false) then  ShowMessage('error play');


There are no errors. only with 64-bit compilation is playback without sound.
« Last Edit: 1 Jul '20 - 08:51 by firemen »

Ian @ un4seen

  • Administrator
  • Posts: 23301
Re: BASS for Android
« Reply #1751 on: 1 Jul '20 - 13:33 »
I suspect that is due to a difference in the size of Delphi's "LongInt" type on 32-bit and 64-bit Android. Try replacing all instances of that in the BASSMIDI.PAS file with "Integer".

firemen

  • Posts: 156
Re: BASS for Android
« Reply #1752 on: 1 Jul '20 - 13:38 »
thanks, it worked!

Ian @ un4seen

  • Administrator
  • Posts: 23301
Re: BASS for Android
« Reply #1753 on: 2 Jul '20 - 15:04 »
Great! An updated BASSMIDI.PAS file is up in the Win32 BASSMIDI package now.

In other news, an Android version of the SPECTRUM example has been added to the package in the 1st post. The LIVESPEC example has also been updated.

Antwan

  • Posts: 22
Re: BASS for Android
« Reply #1754 on: 15 Jul '20 - 20:08 »
[I figured it out!]

I've recently started learning to develop for Android. So far, having a good time with it but I hit a bit of a small block on this one.

I've imported the BASS java file and so files as instructed, they are in my APK and I can return the version number. When I go to init BASS though, the app crashes immediately.

Code: [Select]
2020-07-15 20:00:33.699 6807-6807/com.gibz.gibzmediaplayer E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.gibz.gibzmediaplayer, PID: 6807
    java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.gibz.gibzmediaplayer-PaxXh3Fty1KkLAzdZo-BqQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.gibz.gibzmediaplayer-PaxXh3Fty1KkLAzdZo-BqQ==/lib/x86, /data/app/com.gibz.gibzmediaplayer-PaxXh3Fty1KkLAzdZo-BqQ==/base.apk!/lib/x86, /system/lib, /system/product/lib]]] couldn't find "libnative-lib.so"
        at java.lang.Runtime.loadLibrary0(Runtime.java:1067)
        at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
        at java.lang.System.loadLibrary(System.java:1667)
        at com.un4seen.bass.BASS.<clinit>(BASS.java:761)
        at com.un4seen.bass.BASS.BASS_Init(Native Method)
        at com.gibz.gibzmediaplayer.MainActivity.onCreate(MainActivity.kt:18)
        at android.app.Activity.performCreate(Activity.java:7802)
        at android.app.Activity.performCreate(Activity.java:7791)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

If I remove the BASS init, it works fine. I'm writing the application in Android Studio with Kotlin. Here is my current onCreate:

Code: [Select]
override fun onCreate(savedInstanceState: Bundle?) {
     super.onCreate(savedInstanceState)
     setContentView(R.layout.activity_main)

     // Initalize BASS Library
     if (!BASS.BASS_Init(-1, 44100, 0))
     {
         Toast.makeText(applicationContext,"Could not initialize the Audio System",Toast.LENGTH_SHORT).show()
         return
     }
}

Thanks for any help in advance.
« Last Edit: 16 Jul '20 - 11:29 by Antwan »

Ian @ un4seen

  • Administrator
  • Posts: 23301
Re: BASS for Android
« Reply #1755 on: 3 Sep '20 - 15:48 »
The Android version of the BASSWV 2.4.7 release is up now in the 1st post.

Ian @ un4seen

  • Administrator
  • Posts: 23301
Re: BASS for Android
« Reply #1756 on: 17 Sep '20 - 17:29 »
The Android version of the BASSMIDI 2.4.13 release is up now in the 1st post.

gicci

  • Posts: 76
Re: BASS for Android
« Reply #1757 on: 23 Sep '20 - 00:13 »
The Android version of the BASSMIDI 2.4.13 release is up now in the 1st post.

Hi Ian,

in this version the BASS_MIDI_FontFree() called on a SoundFont loaded from a memory buffer never returns hanging the app. I can provide logs if needed.

Thank you.

Ian @ un4seen

  • Administrator
  • Posts: 23301
Re: BASS for Android
« Reply #1758 on: 23 Sep '20 - 16:03 »
Oops! A fix for that is up now in the 1st post. The problem only affected Android (when using Java API), so updates for other platforms aren't needed.

lenailicheva4488

  • Posts: 20
Re: BASS for Android
« Reply #1759 on: 23 Sep '20 - 17:30 »
Hi.
I am using successfully BASS for Windows. C++ Builder 10.3.3
I cannot use bass.h for Android.
[bccaarm Error] bass.h(20): typedef redefinition with different types ('uint32_t' (aka 'unsigned int') vs 'unsigned long')
  sysmac.h(244): previous definition is here


In bass.h
#ifdef _WIN32
#include <wtypes.h>
typedef unsigned __int64 QWORD;
#else
#include <stdint.h>
#define WINAPI
#define CALLBACK
typedef uint8_t BYTE;
typedef uint16_t WORD;
typedef uint32_t DWORD; <---ERROR
typedef uint64_t QWORD;

Where can I get bass.h for Android?
Thanks.

gicci

  • Posts: 76
Re: BASS for Android
« Reply #1760 on: 23 Sep '20 - 22:57 »
Oops! A fix for that is up now in the 1st post. The problem only affected Android (when using Java API), so updates for other platforms aren't needed.

Works perfectly now. Fast as usual  :) Thank you!

Ian @ un4seen

  • Administrator
  • Posts: 23301
Re: BASS for Android
« Reply #1761 on: 24 Sep '20 - 13:50 »
I am using successfully BASS for Windows. C++ Builder 10.3.3
I cannot use bass.h for Android.
[bccaarm Error] bass.h(20): typedef redefinition with different types ('uint32_t' (aka 'unsigned int') vs 'unsigned long')
  sysmac.h(244): previous definition is here


In bass.h
#ifdef _WIN32
#include <wtypes.h>
typedef unsigned __int64 QWORD;
#else
#include <stdint.h>
#define WINAPI
#define CALLBACK
typedef uint8_t BYTE;
typedef uint16_t WORD;
typedef uint32_t DWORD; <---ERROR
typedef uint64_t QWORD;

Where can I get bass.h for Android?

The standard BASS.H file can be used on all platforms, but might need some small changes in some cases. In your case, it looks like DWORD has already been defined elsewhere (in SYSMAC.H), so you can comment-out the definition in the BASS.H file. BASS.H may be changed to use the stdint types (eg. uint32_t instead of DWORD) in a future release to avoid such issues.

lenailicheva4488

  • Posts: 20
Re: BASS for Android
« Reply #1762 on: 25 Sep '20 - 09:24 »
Thank You very much! It works!
//Android C++ Builder:
//typedef uint32_t DWORD;
typedef uint32_t UINT32;

saga

  • Posts: 2463
Re: BASS for Android
« Reply #1763 on: 25 Sep '20 - 10:04 »
Note that the replacement you did is not necessary; the typedef syntax means "the DWORD type will be an alias of the uint32_t type" so with your change you now add a new, unused type called UINT32 and make it an alias of uint32_t. As BASS does not use a UINT32 type, you can simply remove that line.

lenailicheva4488

  • Posts: 20
Re: BASS for Android
« Reply #1764 on: 25 Sep '20 - 15:37 »
Note that the replacement you did is not necessary; the typedef syntax means "the DWORD type will be an alias of the uint32_t type" so with your change you now add a new, unused type called UINT32 and make it an alias of uint32_t. As BASS does not use a UINT32 type, you can simply remove that line.

Thank You!
I also try Delphi 10.3.3 but:
[DCC Error] bass.pas(543): E2003 Undeclared identifier: 'PAnsiChar'
  // Device info structure
  BASS_DEVICEINFO = record
    name: PAnsiChar;    // description <-- ERROR
    driver: PAnsiChar;  // driver
    flags: DWORD;
  end;

Ian @ un4seen

  • Administrator
  • Posts: 23301
Re: BASS for Android
« Reply #1765 on: 25 Sep '20 - 17:02 »
It looks like PAnsiChar isn't supported by Delphi on Android. I'm not sure what the solution is. Perhaps PByte?

There's some info here:

   http://docwiki.embarcadero.com/RADStudio/Sydney/en/Migrating_Delphi_Code_to_Mobile_from_Desktop

lenailicheva4488

  • Posts: 20
Re: BASS for Android
« Reply #1766 on: 27 Sep '20 - 07:49 »
It looks like PAnsiChar isn't supported by Delphi on Android. I'm not sure what the solution is. Perhaps PByte?

There's some info here:

   http://docwiki.embarcadero.com/RADStudio/Sydney/en/Migrating_Delphi_Code_to_Mobile_from_Desktop

Thank You now it compiles fine.
For Delphi 10.3.3 use Byte instead of AnsiChar, and MarshaledAString instead of PAnsiChar.

I got another problem. Please give advice.
Delphi 10.3.3
1. Create empry project Android 64 bit. Build - all fine.
2. Add armeabi-v7a\libbass.so to Project Deployment.
3. Add armeabi-v7a\libbass.so to Project Add to Project.
4. Uses bass.pas
5. Build project.
[DCC Error] E2597 C:\Users\Public\Documents\Embarcadero\Studio\20.0\PlatformSDKs\android-ndk-r17b\toolchains\aarch64-linux-android-4.9\prebuilt\windows\aarch64-linux-android\bin\ld.exe: cannot find -lbass
[DCC Fatal Error] F2588 Linker error code: 1 ($00000001)


Where is my mistake? Thank you.

« Last Edit: 28 Sep '20 - 18:18 by lenailicheva4488 »

lenailicheva4488

  • Posts: 20
Re: BASS for Android
« Reply #1767 on: 28 Sep '20 - 13:00 »
Fix it.
IMPORTANT additional step:
set the path to "library\lib\arm64-v8a"

liuhen1001

  • Posts: 3
Re: BASS for Android
« Reply #1768 on: 11 Oct '20 - 03:17 »
My program crashed.

backtrace:
  #00  pc 000000000000a6e8  /data/app/audio.free.music.equalizer.musicplayer-My0i5qecr1isAk11nsoezg==/split_config.arm64_v8a.apk (offset 0x7000)
  #01  pc 000000000002e400  /data/app/audio.free.music.equalizer.musicplayer-My0i5qecr1isAk11nsoezg==/split_config.arm64_v8a.apk (offset 0x7000) (BASS_FXReset+44)
  #02  pc 000000000002e4a4  /data/app/audio.free.music.equalizer.musicplayer-My0i5qecr1isAk11nsoezg==/split_config.arm64_v8a.apk (offset 0x7000) (Java_com_un4seen_bass_BASS_BASS_1FXReset+12)
  #03  pc 0000000000036718  /data/app/audio.free.music.equalizer.musicplayer-My0i5qecr1isAk11nsoezg==/oat/arm64/base.odex (offset 0x35000) (com.un4seen.bass.BASS.BASS_ChannelPause [DEDUPED]+152)
  #04  pc 000000000055e64c  /system/lib64/libart.so (art_quick_invoke_static_stub+604)
  #05  pc 00000000000cf960  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
  #06  pc 0000000000283748  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
  #07  pc 000000000027d704  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
  #08  pc 000000000052f12c  /system/lib64/libart.so (MterpInvokeStatic+204)
  #09  pc 0000000000550a94  /system/lib64/libart.so (ExecuteMterpImpl+14612)
  #10  pc 00000000005079c2  /data/app/audio.free.music.equalizer.musicplayer-My0i5qecr1isAk11nsoezg==/oat/arm64/base.vdex (d.a.c.c.d.a.l.h+54)
  #11  pc 0000000000257200  /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.llvm.45301513)+496)
  #12  pc 000000000025cd80  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
  #13  pc 000000000027d6e8  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
  #14  pc 0000000000530c78  /system/lib64/libart.so (MterpInvokeVirtualQuick+584)
  #15  pc 0000000000554694  /system/lib64/libart.so (ExecuteMterpImpl+29972)
  #16  pc 0000000000506ee8  /data/app/audio.free.music.equalizer.musicplayer-My0i5qecr1isAk11nsoezg==/oat/arm64/base.vdex (d.a.c.c.d.a.e.b+220)
  #17  pc 0000000000257200  /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.llvm.45301513)+496)
  #18  pc 000000000025cd80  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
  #19  pc 000000000027d6e8  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
  #20  pc 0000000000530c78  /system/lib64/libart.so (MterpInvokeVirtualQuick+584)
  #21  pc 0000000000554694  /system/lib64/libart.so (ExecuteMterpImpl+29972)
  #22  pc 00000000005619b6  /data/app/audio.free.music.equalizer.musicplayer-My0i5qecr1isAk11nsoezg==/oat/arm64/base.vdex (com.lb.library.c.c$a.run+42)
  #23  pc 0000000000257200  /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.llvm.45301513)+496)
  #24  pc 000000000051e368  /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
  #25  pc 00000000005674fc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
  #26  pc 00000000003da064  /system/framework/arm64/boot.oat (offset 0x114000) (java.util.concurrent.ThreadPoolExecutor.runWorker+996)
  #27  pc 00000000003d6dc0  /system/framework/arm64/boot.oat (offset 0x114000) (java.util.concurrent.ThreadPoolExecutor$Worker.run+64)
  #28  pc 000000000025d2e8  /system/framework/arm64/boot.oat (offset 0x114000) (java.lang.Thread.run+72)
  #29  pc 000000000055e388  /system/lib64/libart.so (art_quick_invoke_stub+584)
  #30  pc 00000000000cf940  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
  #31  pc 0000000000464890  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
  #32  pc 0000000000465958  /system/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+424)
  #33  pc 0000000000490cd0  /system/lib64/libart.so (art::Thread::CreateCallback(void*)+1120)
  #34  pc 0000000000083814  /system/lib64/libc.so (__pthread_start(void*)+36)
  #35  pc 000000000002340c  /system/lib64/libc.so (__start_thread+68)

Serg

  • Posts: 7
Re: BASS for Android
« Reply #1769 on: 11 Oct '20 - 11:08 »
Hello! Please tell me how to change the channel frequencies. For example, there is a BASS_ChannelGetData (chan, bbuf, BASS.BASS_DATA_FFT1024) method that opens a frequency selection, the method is used to visualize the spectrum. And how to change the frequencies of the spectrum in the channel, so that the channel does not slow down. Here is the method from the BASS examples:

protected void onDraw(Canvas canvas) {
         if (chan == 0) {
            Paint p = new Paint();
            p.setColor(Color.WHITE);
            p.setTextAlign(Align.CENTER);
            p.setTextSize(Math.min(dwidth / 20, dheight / 16));
            canvas.drawText("touch to open a file", dwidth / 2, dheight / 2, p);
            return;
         }
            ByteBuffer bbuf = ByteBuffer.allocateDirect(512 * 4); // allocate a buffer for the FFT data
            bbuf.order(null); // little-endian byte order
            BASS.BASS_ChannelGetData(chan, bbuf, BASS.BASS_DATA_FFT1024); // get the FFT data
            float[] fft = new float[512]; // allocate a "float" array for the FFT data
            bbuf.asFloatBuffer().get(fft); // get the data from the buffer into the array
               Arrays.fill(specbuf, 0);
               final int BANDS = 28;
               for (int x = 0, b0 = 0; x < BANDS; x++) {
                  float peak = 0;
                  float peak1 = 0;
                  int b1 = (int) Math.pow(2, x * 9.0 / (BANDS - 1));
                  if (b1 <= b0) b1 = b0 + 1; // make sure it uses at least 1 FFT bin
                  if (b1 > 511) b1 = 511;
                  for (; b0 < b1; b0++)
                  if (peak < fft[1 + b0]) peak = fft[1 + b0];

                  int y = (int) (Math.sqrt(peak) * 3 * height - 4); // scale it (sqrt to make low values more visible)
                  if (y > height) y = height; // cap it
                  while (--y >= 0) {
                     int s = (height - 1 - y) * width + x * (width / BANDS);
                     Arrays.fill(specbuf, s, s + (width / BANDS) * 9 / 10, palette[y * 127 / height + 1]); // draw bar
                  }
               }
         // update the display
         canvas.drawBitmap(Bitmap.createBitmap(specbuf, width, height, Bitmap.Config.ARGB_8888),
               new Rect(0, 0, width, height), new Rect(0, 0, dwidth, dheight), null);
      }
   }

What do I need to do to dynamically change channel frequencies? Please tell me, I will be very grateful.
« Last Edit: 12 Oct '20 - 08:01 by Serg »

Ian @ un4seen

  • Administrator
  • Posts: 23301
Re: BASS for Android
« Reply #1770 on: 12 Oct '20 - 13:25 »
My program crashed.

backtrace:
  #00  pc 000000000000a6e8  /data/app/audio.free.music.equalizer.musicplayer-My0i5qecr1isAk11nsoezg==/split_config.arm64_v8a.apk (offset 0x7000)
  #01  pc 000000000002e400  /data/app/audio.free.music.equalizer.musicplayer-My0i5qecr1isAk11nsoezg==/split_config.arm64_v8a.apk (offset 0x7000) (BASS_FXReset+44)
  #02  pc 000000000002e4a4  /data/app/audio.free.music.equalizer.musicplayer-My0i5qecr1isAk11nsoezg==/split_config.arm64_v8a.apk (offset 0x7000) (Java_com_un4seen_bass_BASS_BASS_1FXReset+12)
...

That looks like it crashed in a BASS_FXReset call. Are you calling that in your code? If so, what FX are you using with BASS_ChannelSetFX? Does disabling some/all of the FX prevent the crash, and if so, can you identify which FX seems to cause it?

Also confirm what BASS version you're using (with BASS_GetVersion). If you aren't already using this latest build, please give it a try and post a new crash log if it still crashes:

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

Hello! Please tell me how to change the channel frequencies. For example, there is a BASS_ChannelGetData (chan, bbuf, BASS.BASS_DATA_FFT1024) method that opens a frequency selection, the method is used to visualize the spectrum. And how to change the frequencies of the spectrum in the channel, so that the channel does not slow down.

Do you want to change the pitch of the sound without affecting the playback speed? If so, you can use the BASS_FX add-on's tempo processing to do that - see the BASS_FX_TempoCreate function and BASS_ATTRIB_TEMPO_PITCH option.

saga

  • Posts: 2463
Re: BASS for Android
« Reply #1771 on: 19 Oct '20 - 12:33 »
While our app is in the foreground, playback and recording callbacks arrive in a timely manner with the buffer size we requested. When switching to the home screen or another app, our app is obviously run with a lower priority. However, as a consequence the record and stream callbacks great vary in frame sizes; I see anything from the intended buffer size up to three times the normal amount.

In our case, both recording and playback streams are fed into a rather timing-critical third-party component which doesn't seem to handle these fluctuations very well. I'm not really knowledgeable about the resource management of Android, but I wonder if there is something BASS could do to increase the priority of the audio threads to guarantee a more timely delivery of record and stream procs.
Alternatively, is there some way to synchronize recording and playback streams in a way so that they are always called with the same (or at least similar) buffer sizes? I suppose we could add our own buffer inside those callbacks but that's just yet another layer of buffering that I'd rather try to avoid...

Ian @ un4seen

  • Administrator
  • Posts: 23301
Re: BASS for Android
« Reply #1772 on: 19 Oct '20 - 14:43 »
You can check the callback thread priorities with the Process.getThreadPriorty method (in the callback function). BASS does raise the priority of its update threads (which call STREAMPROCs), but that's only relative to the app's other threads. Android will by default reduce the priority of background apps. That can be avoided by implementing a "foreground service". Here's some info on that:

   https://developer.android.com/guide/components/foreground-services

saga

  • Posts: 2463
Re: BASS for Android
« Reply #1773 on: 20 Oct '20 - 13:08 »
Thanks, from a quick test it seems like a foreground service might be a viable solution.

lefjucabro

  • Posts: 8
Re: BASS for Android
« Reply #1774 on: 21 Oct '20 - 15:19 »
Fix it.
IMPORTANT additional step:
set the path to "library\lib\arm64-v8a"

Hi,

I want to evaluate Bass on Android with Delphi Sydney and I get this issue.
I followed previous steps but it doesn't work.

Attached my project :
1. Create empry project Android 64 bit. Build - all fine.
2. Add "arm64-v8a\libbass.so" to Project
    Add "x86_64\libbass.so" to Project
3. Add "arm64-v8a\libbass.so" to "library\lib\arm64-v8a\" Project Deployment.
    Add "x86_64\libbass.so" to "library\lib\arm64-v8a\" Project Deployment.
4. Add "bass.pas" to project
5. Build project.
[DCC Error] E2597 C:\Users\Public\Documents\Embarcadero\Studio\20.0\PlatformSDKs\android-ndk-r17b\toolchains\aarch64-linux-android-4.9\prebuilt\windows\aarch64-linux-android\bin\ld.exe: cannot find -lbass
[DCC Fatal Error] F2588 Linker error code: 1 ($00000001)