|
Ian @ un4seen
Administrator
Posts: 15244
|
 |
« Reply #20 on: 1 Dec '11 - 16:02 » |
Quote
|
That's strange. Does the problem go away if you simply remove BASS from the project and leave everything else untouched? Do you see any information on what happened in the "LogCat" view? If the problem persists, please upload the APK file to have a look at here... ftp.un4seen.com/incoming/
|
|
|
|
|
Logged
|
|
|
|
|
bjadams
Posts: 9
|
 |
« Reply #21 on: 2 Dec '11 - 06:53 » |
Quote
|
The vanilla project, without bass included works perfectly. As soon as I put the bass information in android.mk, the app crashes at launch.
I am using the AGK Opengl api. Can I email you the project in private, or is the ftp private?
Thanks a lot for support.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
bjadams
Posts: 9
|
 |
« Reply #23 on: 2 Dec '11 - 13:32 » |
Quote
|
Uploaded a zip on the ftp with 2 projects. 1 without Bass, and one with the bass libs added to android.mk (this one crashes on app launch)
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15244
|
 |
« Reply #24 on: 2 Dec '11 - 16:44 » |
Quote
|
Uploaded a zip on the ftp with 2 projects. 1 without Bass, and one with the bass libs added to android.mk (this one crashes on app launch)
Java will look in the app's "lib" folder for shared libraries, but I don't think the OS does that, ie. the app's "lib" folder isn't in the library search path, so the LIBBASS.SO file can't be found and the app can't be launched. One way around it that seems to be working is to change the "SONAME" entry in the LIBBASS.SO file to the full installation path (eg. "/data/data/<packagename>/lib/libbass.so"), but that isn't very elegant. I'll see if I can find a better way around it.
|
|
|
|
|
Logged
|
|
|
|
|
bjadams
Posts: 9
|
 |
« Reply #25 on: 2 Dec '11 - 18:14 » |
Quote
|
There is a LIB folder in the APK. libbass.so is actually inside this directory.
|
|
|
|
« Last Edit: 2 Dec '11 - 18:19 by bjadams »
|
Logged
|
|
|
|
|
raczynski
Guest
|
 |
« Reply #26 on: 3 Dec '11 - 12:00 » |
Quote
|
Congratulations !!! BASS library rocks !!! 
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15244
|
 |
« Reply #27 on: 5 Dec '11 - 15:17 » |
Quote
|
There is a LIB folder in the APK. libbass.so is actually inside this directory.
Yes, that's fine. The problem is that the OS can't find the LIBBASS.SO file because the LIB folder isn't in the library search path. Note, unlike Windows, Android (and other Unix-like OS) won't automatically look in the executable's folder for libraries. So you need to be able to either modify the library search path or provide the library's full path. The SONAME tweak/hack I mentioned achieves the latter. Another option is to dynamically load the library, rather than linking with it. To do that, you would remove the "LOCAL_SHARED_LIBRARIES := bass" build rule and add "-ldl" to the "LOCAL_LDLIBS" rule, and do something like this in your code... #include <dlfcn.h> #define BASSDEF(f) (*f) // define the BASS functions as pointers #include "bass.h"
...
BOOL LoadBASS() { // load the BASS library and get the needed functions void *basslib=dlopen("/data/data/<packagename>/lib/libbass.so", RTLD_LAZY); if (!basslib) return FALSE; // failed #define LOADBASSFUNCTION(f) *((void**)&f)=dlsym(basslib, #f) LOADBASSFUNCTION(BASS_ErrorGetCode); LOADBASSFUNCTION(BASS_Init); ... }
|
|
|
|
|
Logged
|
|
|
|
|
bjadams
Posts: 9
|
 |
« Reply #28 on: 5 Dec '11 - 19:24 » |
Quote
|
If I remove "LOCAL_SHARED_LIBRARIES := bass" then libbass.so is not included in the .apk in LIB 
|
|
|
|
|
Logged
|
|
|
|
|
Bass4Android
Guest
|
 |
« Reply #29 on: 6 Dec '11 - 11:38 » |
Quote
|
Hi! Actually i am trying to make my Android App gapless playback friendly. I found here an example on this forum, but it crashes my VM (on Emulator,, didn't try this code on my phone). I have uploaded the logcat as an image cause eclipse doesn't export it to the Log.txt.  if(BASS.BASS_Init(-1, 44100, BASS.BASS_DEVICE_DEFAULT)) { BASS.STREAMPROC sp = new STREAMPROC() { public int STREAMPROC(int handle, ByteBuffer buffer, int length, Object user) { // This code is incomplete, only one Return for Testing... return BASS.BASS_ChannelGetData(stream1, buffer, length); } }
this.stream1 = BASSWV.BASS_WV_StreamCreateFile(file, 0, 0, BASS.BASS_STREAM_DECODE);
BASS.BASS_CHANNELINFO info = new BASS_CHANNELINFO(); BASS.BASS_ChannelGetInfo(this.stream1, info);
stream = BASS.BASS_StreamCreate(info.freq,info.chans,0,sp,0); // This one causes the error, in the example is BASS_StreamPlay() used, but this method doesen't here? BASS.BASS_ChannelPlay(this.stream, false); }
Thank you! 
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15244
|
 |
« Reply #30 on: 6 Dec '11 - 16:03 » |
Quote
|
If I remove "LOCAL_SHARED_LIBRARIES := bass" then libbass.so is not included in the .apk in LIB  That's strange. Did you still keep the BASS library rule block? "LOCAL_MODULE := bass", etc. Actually i am trying to make my Android App gapless playback friendly. I found here an example on this forum, but it crashes my VM (on Emulator,, didn't try this code on my phone). I have uploaded the logcat as an image cause eclipse doesn't export it to the Log.txt.
Ah yes, there was a problem in the Java STREAMPROC callback handler. An update to correct that is now up in the package (in the 1st post). Let me know if you still have any trouble with it.
|
|
|
|
|
Logged
|
|
|
|
|
Bass4Android
Guest
|
 |
« Reply #31 on: 6 Dec '11 - 19:15 » |
Quote
|
Hi,
thx 4 update, seems to work now. But i don't hear any sound. Is there something wrong in my code?
Thank you
|
|
|
|
|
Logged
|
|
|
|
|
bjadams
Posts: 9
|
 |
« Reply #32 on: 6 Dec '11 - 19:16 » |
Quote
|
Yes, "LOCAL_MODULE := bass" is still there.
If you have some time, can you maybe test with the project files I uploaded on the ftp?
Thanks a lot.
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15244
|
 |
« Reply #33 on: 7 Dec '11 - 15:09 » |
Quote
|
thx 4 update, seems to work now. But i don't hear any sound. Is there something wrong in my code?
Oops! There was still a problem in the Java STREAMPROC callback handler (it was ignoring the return value). Another update to correct that is up now (in the 1st post). If you have some time, can you maybe test with the project files I uploaded on the ftp?
Ah, I see what you mean. Removing the "APP_MODULES" line from your Application.mk file (or else adding "bass" to it) should sort that.
|
|
|
|
|
Logged
|
|
|
|
|
Lbaudio
Posts: 1
|
 |
« Reply #34 on: 17 Dec '11 - 18:41 » |
Quote
|
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15244
|
 |
« Reply #35 on: 19 Dec '11 - 17:32 » |
Quote
|
An Android version of the BASSMIDI add-on is now available (see the 1st post), along with a port of the MIDITEST example.
|
|
|
|
|
Logged
|
|
|
|
|
fulbert
Posts: 6
|
 |
« Reply #36 on: 23 Dec '11 - 09:23 » |
Quote
|
Hi,
Does the current BASS for Android support pushing data to stream [STREAMPROC_PUSH] as the enumeration for this does not seem to exist?
Edit: Nmind what I said above, rather how do I create a stream for push?
|
|
|
|
« Last Edit: 23 Dec '11 - 09:26 by fulbert »
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15244
|
 |
« Reply #37 on: 23 Dec '11 - 15:54 » |
Quote
|
The Java class was missing the required BASS_StreamCreate overload for dummy/push stream support. An update to address that is up now (in the 1st post). Using that, you can create a push stream like this... stream=BASS.BASS_StreamCreate(freq, chans, flags, BASS.STREAMPROC_PUSH, null);
|
|
|
|
|
Logged
|
|
|
|
|
fulbert
Posts: 6
|
 |
« Reply #38 on: 24 Dec '11 - 08:34 » |
Quote
|
Thanks! I will give it a go when I am back in office. Merry Christmas!
|
|
|
|
|
Logged
|
|
|
|
|
fulbert
Posts: 6
|
 |
« Reply #39 on: 27 Dec '11 - 06:41 » |
Quote
|
Yup the push stream is working. Thanks!
Will BASS_FX be available for Android as well and if so is there an estimate on when it will be available?
|
|
|
|
|
Logged
|
|
|
|
|