FANDOM


Raw Audio recording with AudioRecord


11,025 Hz  is a commonly used sample rate.


int sampleRateInHz = 11025;
AudioFormat.CHANNEL_CONFIGURATION_MONO
AudioFormat.CHANNEL_CONFIGURATION_STEREO
AudioFormat.CHANNEL_CONFIGURATION_INVALID
AudioFormat.CHANNEL_CONFIGURATION_DEFAULT
AudioFormat.ENCODING_DEFAULT
AudioFormat.ENCODING_INVALID
AudioFormat.ENCODING_PCM_16BIT
AudioFormat.ENCODING_PCM_8BIT


PCM - pulse code modulation


int bufferSizeInBytes = AudioRecord.getMinBufferSize(

sampleRateInHz,

channelConfig,

audioFormat);