Could anyone tell me the reason?
Because what getMinBufferSize
returns for a given configuration is the smallest buffer size you'll be allowed to specify when creating you AudioRecord
.
Why would you want the smallest possible buffer size? To get the lowest possible latency.
Imagine that you're doing something like an SPL meter; you wouldn't want there to be a one-second delay before your UI reacts to a change in the sound pressure.
The buffer size doesn't determine how much data you can request from read()
, though. It's ok to request more data than the size of the AudioRecord's
buffer; read()
simply won't return until all the data you've requested has been read.