I capture sound in real time to buffer and then I process these data. But sometimes I get warning: buffer overflow what cause of problem in the processing.
I created AudioRecord:
bufferSize = ???; recorder = new AudioRecord(MediaRecorder.AudioSource.MIC, RECORDER_SAMPLERATE, RECORDER_CHANNELS, RECORDER_AUDIO_ENCODING, **bufferSize**); but there are not method for getMaximumBufferSize or semthing like that (only getMinBufferSize - but here is buffer owerflow). And I think that setting own buffer size is not good solution.