Author Topic: BASS for Android  (Read 496854 times)

otherside

  • Posts: 39
Re: BASS for Android
« Reply #1500 on: 20 Dec '18 - 08:47 »
Thanks, I see what the problem is now. Here's an update that should fix it:

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

Let me know if you still have the problem with that.

Thank you. It fixed the problem. Also wanted to ask why BASS.BASS_StreamGetFilePosition(chan, BASS.BASS_FILEPOS_END) returns -1 on .m4a files? Here's a file - https://yadi.sk/d/4XF2bH8PuUtTsw

Ian @ un4seen

  • Administrator
  • Posts: 21456
Re: BASS for Android
« Reply #1501 on: 20 Dec '18 - 15:18 »
When using Android media codecs (except AAC/ADTS), the file reading isn't handled by BASS so most of the BASS_StreamGetFilePosition modes aren't available. BASS_FILEPOS_SIZE is the only one that is.

pony

  • Posts: 3
Re: BASS for Android
« Reply #1502 on: 15 Jan '19 - 08:36 »
android studio debug to this line,it will step over this line and exit the app. I don't konw the reason and need your help.thanks.

int version= BASSenc_MP3.BASS_Encode_MP3_GetVersion();

Ian @ un4seen

  • Administrator
  • Posts: 21456
Re: BASS for Android
« Reply #1503 on: 15 Jan '19 - 13:22 »
That probably means the BASSenc_MP3 library (libbassenc_mp3.so files) hasn't been included in the app. You can open the app's APK file in ZIP software to check that. Also check the Logcat window for an error message.

Ian @ un4seen

  • Administrator
  • Posts: 21456
Re: BASS for Android
« Reply #1504 on: 17 Jan '19 - 16:38 »
The Android version of the BASS 2.4.14 release is up now in the 1st post.

pony

  • Posts: 3
Re: BASS for Android
« Reply #1505 on: 18 Jan '19 - 07:26 »
I think Such ".so" files have been complied,but the error I can't get it. the URL can't open.can you give some info about it.
Error: Your project contains C++ files but it is not using a supported native build system.
Consider using CMake or ndk-build integration. For more information, go to:
 https://d.android.com/r/studio-ui/add-native-code.html
Alternatively, you can use the experimental plugin:
 https://developer.android.com/r/tools/experimental-plugin.html

pony

  • Posts: 3
Re: BASS for Android
« Reply #1506 on: 18 Jan '19 - 07:41 »
I can load libbass.so ,but  libbasssenc.so or libbassenc_mp3.so. I spend  a week to find a way load The last two ".so" files.please help me. 

Ian @ un4seen

  • Administrator
  • Posts: 21456
Re: BASS for Android
« Reply #1507 on: 18 Jan '19 - 15:15 »
It looks like you're using Java there? If so, the BASS libraries should get loaded automatically when you call a function from them, due to the System.loadLibrary call(s) in the BASS Java classes. To help find what/where the problem is, perhaps you could try starting with the RECTEST example Android Studio project and add the BASSenc libraries/calls to it, and see if you still have the problem then?

gicci

  • Posts: 51
Re: BASS for Android
« Reply #1508 on: 19 Jan '19 - 23:31 »
Hi Ian,

I have problems with BASS_FX_BFX_CHORUS effect. I have implemented sliders for its parameters to let users experiment the different settings in real-time, but after a few changes (the parameters are changed only when the slider is released), randomly, there is static and then silence. Removing the effect and re-enabling it fixes the problem.
I am using also BASS_FX_BFX_DAMP and BASS_FX_BFX_FREEVERB and for them there is no such issue.

As an example I had this problem with the following changes:

Adding effect: FxSetting{type=0x1000d, params=[65549, 58, 0, 50, 50, 10]}
Changing effect: FxSetting{type=0x1000d, params=[65549, 76, 0, 50, 50, 10]}
Changing effect: FxSetting{type=0x1000d, params=[65549, 54, 0, 50, 50, 10]}
Changing effect: FxSetting{type=0x1000d, params=[65549, 75, 0, 50, 50, 10]}
Changing effect: FxSetting{type=0x1000d, params=[65549, 75, 35, 50, 50, 10]}
Changing effect: FxSetting{type=0x1000d, params=[65549, 75, -1, 50, 50, 10]}
Changing effect: FxSetting{type=0x1000d, params=[65549, 75, 40, 50, 50, 10]}

Where I set the parameters from the values in the array with the following formulas (so I was changing the feedback parameter):

Code: [Select]
BASS_FX.BASS_BFX_CHORUS v = new BASS_FX.BASS_BFX_CHORUS();
v.fDryMix   = (100 - i[1]) / 100f; // dry (unaffected) signal mix           [-2......2]
v.fWetMix   = i[1]/ 100f;          // wet (affected) signal mix             [-2......2]
v.fFeedback = i[2] / 100f;         // output signal to feed back into input [-1......1]
v.fMinSweep = i[3] / 100f;         // minimal delay ms                      [0<...6000]
v.fMaxSweep = (i[3]+i[4])/100f;    // maximum delay ms                      [0<...6000]
v.fRate     = i[5];                // rate ms/s                             [0<...1000]
v.lChannel  = BASS_FX.BASS_BFX_CHANALL;

Any ideas about how to fix this issue?
« Last Edit: 19 Jan '19 - 23:34 by gicci »

Ian @ un4seen

  • Administrator
  • Posts: 21456
Re: BASS for Android
« Reply #1509 on: 21 Jan '19 - 16:31 »
Can you try only changing one of the effect's parameter on each run (leave rest at defaults), to hopefully find which is causing the problem? Also confirm what architecture(s) you're running the tests on.

gicci

  • Posts: 51
Re: BASS for Android
« Reply #1510 on: 21 Jan '19 - 19:27 »
I tested multiple times, and I have been able to reproduce it only changing the "feedback" parameter, the others seem to be ok. I have tested with ARM, both 32 and 64 bits.

Ian @ un4seen

  • Administrator
  • Posts: 21456
Re: BASS for Android
« Reply #1511 on: 22 Jan '19 - 16:19 »
Oh yes, I'm able to reproduce that too. It looks like there may be a problem in how it's implementing feedback that will need fixing. For now you could use the BASS_FX_DX8_CHORUS effect instead. Note that despite "DX8" in the name, it is available on all platforms (not only Windows).

gicci

  • Posts: 51
Re: BASS for Android
« Reply #1512 on: 22 Jan '19 - 21:41 »
Unfortunately there are problems with BASS_FX_DX8_CHORUS as well: starting from the default values in the doc if I start changing the depth, at a certain point there are disturbances in the output which repeat continuously. The same noise happens in a predictable way setting the delay to the max supported value (20). I guess there is some overflow somewhere.

With last library version I am also no longer able to receive BASS.BASS_SYNC_END events from MIDI files. Everything works if I put back the version I fetched in date 18/10/2018 (not sure it was the previous one).
« Last Edit: 22 Jan '19 - 22:14 by gicci »