Android examples for android.media:Audio
get Minimum Buffer Size from AudioTrack by sampleRate
import android.media.AudioFormat; import android.media.AudioRecord; import android.media.AudioTrack; public class Main{ public static final int getMinimumBufferSize(int sampleRate) { return AudioTrack.getMinBufferSize(sampleRate, AudioFormat.CHANNEL_OUT_MONO, AudioFormat.ENCODING_PCM_16BIT); }//from ww w. j av a 2 s. c o m }