That MIDI file uses the sustain pedal a lot, so there may be quite a lot of notes playing at times. The default limit of 40 voices on Android might not be enough. You could try raising that via the BASS_ATTRIB_MIDI_VOICES (or BASS_CONFIG_MIDI_VOICES) option. For example, you could add this line after the MIDITEST example's BASS_MIDI_StreamCreateFile call to raise its limit to 100 voices:

with bufferTime set to 3000 I get the following error in the log:09-16 22:43:59.641 32038-32038/E/libOpenSLES﹕ pAudioSnk: numBuffers=30009-16 22:43:59.641 32038-32038/W/libOpenSLES﹕ Leaving Engine::CreateAudioRecorder (SL_RESULT_PARAMETER_INVALID)

If I use 2000 (the default value?) it works. Am I doing something wrong?

Is it correct that when using BASS_MIDI_DECAYEND this also applies to decoding channels, ie. when exporting to a wav file, the BASS.BASS_ChannelGetData might return more data at the end of file, ie. the exported wav file might be one or more seconds longer as when not using this flag ?

That looks like there were too many Java object references, but I don't seem to be able to reproduce it here (I tried creating 100s of MP3 streams without freeing them), so I'm not sure what would be causing it. A few questions to perhaps get some clues... Do you have 31 MP3 streams in existence at the same time or is it one at a time, ie. are you freeing the old stream before creating a new stream? Does it make any difference? If it happens even when there is only one stream at a time, can you reproduce it with the examples included in the BASS package? Also, does it matter what MP3 files you open? Also, what Android version are you using, and are you able to reproduce the problem on multiple devices?

//BASS.BASS_ChannelSetSync(channelHandle, BASS.BASS_SYNC_END, 0, EndSync, 0); // DefaultBASS.BASS_ChannelSetSync(channelHandle, BASS.BASS_SYNC_POS | BASS.BASS_SYNC_MIXTIME, BASS.BASS_ChannelSeconds2Bytes(channelHandle, 10), MixSync, 0);I need to play only part of the song as it is necessary for the CUE file.Maybe there is another way to play CUE (flac)?

It isn't safe to call BASS_StreamFree within a mixtime sync's SYNCPROC function. You probably don't actually want to free the stream at that point anyway as there will be buffered data that hasn't been played yet. If you want to free the stream at the sync position, you could set a 2nd non-mixtime sync for that, ie. the mixtime sync only calls BASS_ChannelStop and the non-mixtime sync only calls BASS_StreamFree.

Regarding switching to another song, you could call BASS_ChannelPlay on the next song's stream in the FreeSync function above, ie. when playback reaches the end of the current stream. To avoid delays, the next stream should be created some time before then, eg. the StopSync function could perhaps launch a worker thread to create the next stream.

Regarding switching to another song, you could call BASS_ChannelPlay on the next song's stream in the FreeSync function above, ie. when playback reaches the end of the current stream. To avoid delays, the next stream should be created some time before then, eg. the StopSync function could perhaps launch a worker thread to create the next stream.

I presume the "stop play" and "start play" steps are BASS_ChanneStop and BASS_ChannelPlay calls? I don't seem to be able to reproduce the problem here, so please do send an example file. You can upload it here:

Critical issue comes with Android 6.0!When i try to play any audio from internet which url starts from https:// i get the error - 10 (error code)Everything fine with http or on android 5.1.Please fix it, i'm using the latest version of BASS

Critical issue comes with Android 6.0!When i try to play any audio from internet which url starts from https:// i get the error - 10 (error code)Everything fine with http or on android 5.1.Please fix it, i'm using the latest version of BASS

Error code 10 is BASS_ERROR_SSL, which means that the OpenSSL library couldn't be loaded/initialized. I'll send you a debug version to get more info on what's happening on your device.

That's a VBR MP3 file, which unfortunately don't support accurate seeking because they only include a very basic seek table. You can use the BASS_STREAM_PRESCAN flag in your BASS_StreamCreateFile call to have BASS build its own seek table (note that the call will take longer then as it has to scan the entire file). Another option is to add the BASS_POS_SCAN flag to the BASS_ChannelSetPosition call, to have the seek table built while seeking.

If you're playing an internet radio stream, then changing the tempo won't work very well because the playback rate won't match the server's broadcast rate. Changing the pitch (BASS_ATTRIB_TEMPO_PITCH) should be fine though.

Critical issue comes with Android 6.0!When i try to play any audio from internet which url starts from https:// i get the error - 10 (error code)Everything fine with http or on android 5.1.Please fix it, i'm using the latest version of BASS

Error code 10 is BASS_ERROR_SSL, which means that the OpenSSL library couldn't be loaded/initialized. I'll send you a debug version to get more info on what's happening on your device.