23 May '13 - 12:16 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: 1 ... 9 10 [11] 12 13 ... 18
  Reply  |  Print  
Author Topic: BASS for Android  (Read 48126 times)
elimmedia
Posts: 11


« Reply #200 on: 23 Jul '12 - 04:10 »
Reply with quoteQuote

I've uploaded sample midi files and soundfont.

The soundfont that I attached has only two preset (piano-1, horn-60)

Im not sure that piano has problem, but horn has.

Please let me know if you need any other samples, files.

Cheers,

I have tested the new update and it has the same problem.

I also tried passing filename directly and has same problem too.

I moved back to old library just in case, and it sounds fine.

OK. That looks like it is a more general problem then, not related to loading from memory. There were some internal tweaks recently (more floating-point calculations changed to fixed-point), so the problem is probably somewhere in that stuff. To locate the problem, please upload your soundfont and a MIDI file to reproduce it with here...

   ftp.un4seen.com/incoming/
Logged
fulbert
Posts: 6


« Reply #201 on: 23 Jul '12 - 05:34 »
Reply with quoteQuote

Does BASS_aac for Android support PS (Parametric Stereo) in AAC+?
Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #202 on: 23 Jul '12 - 17:02 »
Reply with quoteQuote

I've uploaded sample midi files and soundfont.

The soundfont that I attached has only two preset (piano-1, horn-60)

Thanks for the test files. The problem was due to the horn's "To Filter Cutoff" setting being outside the valid range (+/-12000 cents), which was resulting in an overflow in a fixed-point calculation. An update that clamps that setting to the valid range is now up in the first post. Let me know if you still have any problems with it.

Does BASS_aac for Android support PS (Parametric Stereo) in AAC+?

I believe it does.
Logged
jonathan
Posts: 9


« Reply #203 on: 24 Jul '12 - 22:33 »
Reply with quoteQuote

Hello,

I'm trying to build a simple test using the recording functionality.  I just want to take what is input via the mic and simply play it back over the speakers.

The problem I'm running into is early in the process attempting to setup the record input.  I call init successfully for both the library and the record init, but when I call BASS_RecordStart(44100, 1, 0, null, 0) I get BASS_ERROR_FORMAT (code: 6).  Any ideas what could be causing this?  It's very similar to the example, only not using a record proc.

Any help would be appreciated.  Thanks!
Logged
jonathan
Posts: 9


« Reply #204 on: 24 Jul '12 - 23:09 »
Reply with quoteQuote

Ack.. figured it out.  I forgot the manifest permission... my mistake!
Logged
jonathan
Posts: 9


« Reply #205 on: 25 Jul '12 - 00:55 »
Reply with quoteQuote

I was able to microphone playthrough to work correctly, but I'm curious if there are optimal settings for the lowest latency?  I understand Android is bad with latency at this time (hopefully Jelly Bean really DOES fix this!), but I'd like to get it as low as possible.

Currently I'm:

1. Initializing BASS
2. Initializing Recording
3. Create output PUSH stream
4. Create record stream via RecordStart with a RecordProc + RECORD_PAUSE
5. Play output stream
6. Play record stream

Is this the lowest latency?  I tried setting NOBUFFER on the output channel but that cause silence.. NOBUFFER on the record channel worked, but didn't appear to have any affect on latency.

Any ideas?
Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #206 on: 25 Jul '12 - 14:43 »
Reply with quoteQuote

I think not using a RECORDPROC function, and requesting data from the recording via BASS_ChannelGetData in a STREAMPROC function with BASS_ATTRIB_NOBUFFER enabled, would give the lowest latency. Something like this...

record=BASS.BASS_RecordStart(freq, chans, 0, null, null); // start recording without a RECORDPROC
output=BASS.BASS_StreamCreate(freq, chans, 0, StreamProc, null); // create a stream to play the recorded data
BASS.BASS_ChannelSetAttribute(output, BASS.BASS_ATTRIB_NOBUFFER, 1); // enable "no buffering" option
BASS.BASS_ChannelPlay(output, 0); // start the output

...

BASS.STREAMPROC StreamProc=new BASS.STREAMPROC() {
public int STREAMPROC(int handle, ByteBuffer buffer, int length, Object user) {
    int r=BASS_ChannelGetData(record, buffer, length); // get data from the recording
    return r;
}
};

You could also try lowering the BASS_CONFIG_DEV_BUFFER setting (prior to calling BASS_Init), eg. to 20ms (the default is 30ms)
Logged
elimmedia
Posts: 11


« Reply #207 on: 29 Jul '12 - 02:58 »
Reply with quoteQuote

I've checked that it works fine now.

Please let us know when sample code for  BASS add-on is ready.

Thank you always.

I've uploaded sample midi files and soundfont.

The soundfont that I attached has only two preset (piano-1, horn-60)

Thanks for the test files. The problem was due to the horn's "To Filter Cutoff" setting being outside the valid range (+/-12000 cents), which was resulting in an overflow in a fixed-point calculation. An update that clamps that setting to the valid range is now up in the first post. Let me know if you still have any problems with it.

Does BASS_aac for Android support PS (Parametric Stereo) in AAC+?

I believe it does.
Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #208 on: 30 Jul '12 - 16:59 »
Reply with quoteQuote

Please let us know when sample code for  BASS add-on is ready.

I'll send it over today.
Logged
jeffdavis
Posts: 293


« Reply #209 on: 31 Jul '12 - 17:48 »
Reply with quoteQuote

I want to use Basic 4 Android to develop an audio enhancement demo for Android tablets.   We use BASS for our Windows based demos.   I'm pretty sure the libraries will work with B4A  but was wondering if anyone has used Basic 4 Android with BASS and if anyone has done Audio DSP with BASS on Android?
Logged
jeffdavis
Posts: 293


« Reply #210 on: 9 Aug '12 - 23:54 »
Reply with quoteQuote

Lets start with some basics.  I doesn't appear this is an existing sample application in the zip for BASS for Android?  It would be nice to have a simple tutorial on how to get starting using the BASS libraries in an Android application.   For example which flavor of Eclipse should we use?   What type of app should we create?   In my case I'd like to create a BASS library that could be used within an Android application for playing MP3 files.   What are all the files in the zip for?  For example what is the difference between the libs, src, and plugins folders?

Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #211 on: 10 Aug '12 - 16:12 »
Reply with quoteQuote

The "libs" folder contains the BASS library, the "src" folder contains the BASS Java class, and the "plugins" folder contains an Android version of the PLUGINS example. Android versions of the FXTEST/NETRADIO/RECTEST/MIDITEST examples are also included in the package. Please see the first post for some instructions on creating Eclipse projects for the examples. If you don't already have it, you will also need to get the Android SDK from here:

   http://developer.android.com/sdk/
Logged
Cuarento
Posts: 3


« Reply #212 on: 10 Aug '12 - 21:03 »
Reply with quoteQuote

Hey,

I have a problem with "BASS_StreamPutData(..)", see the Code below:

byte[] buf1Bytes = {0, 1,3,4,5};
ByteBuffer testBuffer = ByteBuffer.wrap( buf1Bytes );
   
int length = BASS.BASS_StreamPutData( _streamID, testBuffer, testBuffer.capacity() );
   
int errorCode = BASS.BASS_ErrorGetCode();
       
// errorCode  = BASS_ERROR_ILLPARAM = 20; // an illegal parameter was specified

I always get the Error Invalid Param?

What iīm doing wrong?

Thanks for your effort
       
Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #213 on: 13 Aug '12 - 14:15 »
Reply with quoteQuote

BASS_ERROR_ILLPARAM indicates that the "length" parameter ("testBuffer.capacity()" in this case) is invalid. Please confirm how you created the stream, ie. what were the BASS_StreamCreate call parameters? The stream would need to be mono 8-bit (or 5 channel 8-bit) for your example byte array to be valid, as 5 bytes of data won't be a whole number of samples in any other format.
Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #214 on: 17 Aug '12 - 18:01 »
Reply with quoteQuote

An Android version of the new BASSOPUS add-on is now included in the package in the 1st post.
Logged
Brannon
Posts: 16


« Reply #215 on: 31 Aug '12 - 23:42 »
Reply with quoteQuote

It appears that the decoders are exposed in API 16 (Jelly Bean). See here:

http://developer.android.com/reference/android/media/MediaCodec.html

Can BASS for Android be changed to use that API? And if so, does that imply that there are no MP3 patent concerns?
Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #216 on: 3 Sep '12 - 17:26 »
Reply with quoteQuote

I don't think BASS can use that particular API, as it is Java rather than native, but some native decoding support was also added in Android 4.0 (API 14). It doesn't look totally perfect, eg. user file streaming (BASS_StreamCreateFileUser) doesn't look possible, but it could be useful for local file playback at least. I'm planning to run some tests soon. In the meantime, if you would like to use the API above with BASS, you could do so via a user stream (see BASS_StreamCreate), ie. feed the decoded data into that.
Logged
marchiano
Posts: 1


« Reply #217 on: 18 Sep '12 - 11:26 »
Reply with quoteQuote

How can i use BASSOPUS in Android to play opus track?
Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #218 on: 18 Sep '12 - 17:26 »
Reply with quoteQuote

You first need to copy the BASSOPUS libraries from "bassopus/libs" to your project's "libs" folder. Then, the simplest way to use BASSOPUS in your app is to load it via BASS_PluginLoad...

BASS.BASS_PluginLoad(getApplicationInfo().nativeLibraryDir+"/libbassopus.so", 0);

That will add OPUS support to the standard stream creation functions, eg. BASS_StreamCreateFile.
Logged
frandroid
Posts: 8


« Reply #219 on: 2 Oct '12 - 17:03 »
Reply with quoteQuote

I have worked with BASS library without problems until i buy an htc one s. testing mi app with my new htc, the app crashed.

The problem is that I am creating a mp4(aac sound) video with MediaRecorder and i canīt open with  the example FXTest.
If i do the same in another device, as a Samsung galaxy tab 8, all works fine. And the better is that I play the video from Samsung on the Htc, itīs also works fine!! my fucking live....

When i try to open and play the video, there are not any errors, simply not sound. If i use bass_errorgetcode(), the error is 0 (all ok)

The BASS library is the last version. The code i think is correct, because works in other devices. I dont know whats is the problem. do you have any idea? can anyone check this in an htc series one?

the configuration for mediarecorder is this:
mediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
mediaRecorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);

CamcorderProfile profile = CamcorderProfile.get(CamcorderProfile.QUALITY_LOW);
mediaRecorder.setProfile(profile);

is the more basic configuration. I try with another, and the result is the same

thanks for your help!!
Fran
Logged
Pages: 1 ... 9 10 [11] 12 13 ... 18
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines