0 Members and 1 Guest are viewing this topic.
Попробуйте эту сборку:https://yadi.sk/d/QhgzmO7t3GnBb3
Are they able to reproduce crackles? If not, then issue will never be fixed.
using the BASS_DEVICE_16BITS flag in your BASS_Init
Have you tried: [ http://www.un4seen.com/forum/?topic=13225.msg123697#msg123697 ]It might help with noise issue, apparently.
For reference, OpenSL is known to be unreliable for music playback on many devices and cannot be enabled by default, but it may help if the default output mode (Android AudioTrack) is behaving incorrectly - at least it avoids piping all your sound thru Java code.
final int chan = BASS.BASS_StreamCreateFile(url, 0, 0, BASS.BASS_STREAM_DECODE); BASS.BASS_CHANNELINFO info = new BASS.BASS_CHANNELINFO(); BASS.BASS_ChannelGetInfo(chan,info); int sampleRateInHz = info.freq; final int audioFormat = AudioFormat.ENCODING_PCM_16BIT; final int audioBufferSizeBytes = AudioTrack.getMinBufferSize(sampleRateInHz, AudioFormat.CHANNEL_OUT_STEREO, audioFormat); final AudioTrack audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC,sampleRateInHz, info.chans==2?AudioFormat.CHANNEL_OUT_STEREO:AudioFormat.CHANNEL_OUT_MONO, audioFormat, audioBufferSizeBytes , AudioTrack.MODE_STREAM,audioTrackSessionId); new Thread(new Runnable() { @Override public void run() { ByteBuffer buffer = ByteBuffer.allocate(audioBufferSizeBytes); int res = 0; while (res != -1) { while (audioTrack.getPlayState() != AudioTrack.PLAYSTATE_PLAYING) { try { Thread.sleep(50); } catch (InterruptedException e) { } } res = BASS.BASS_ChannelGetData(chan, buffer, audioBufferSizeBytes); if (res > 0) { try { audioTrack.write(buffer.array(), 0, res); // feed it to AudioTrack }catch (IllegalStateException e){ break; } } else { try { Thread.sleep(1000); } catch (InterruptedException e) { } } } } }).start(); audioTrack.play();
Что за устройство? Версия плеера?
Можете поставить версию 2.0? На ней будут заикания? Найти ее можно здесь: https://www.aimp.ru/index.php?do=download&cat=old&os=android