I working on an android app which records audio. For best audio quality it is better to use a buffer of shorts while reading?
//aRecorder.read(shortBuffer, 0, shortBuffer.length);
aRecorder.read(byteBuffer, 0, byteBuffer.length);
Using short[] isn't the same as using byte[] and considering a sample from 2 bytes(byteBuf[i] and byteBuf[i+1])? If I use short[], I must convert it anyway to ByteBuffer to write it on a file.
I'm asking this because I want to know if I switch to buffer of shorts, my recordings will be more accurate? For example, shortBuffer[0] contains the same information as byteBuffer[0] and byteBuffer[1] ?
The recordings could be in 16 bits PCM or 8 bits PCM (User can choose the sample rate, nr of channels, PCM 16 or 8, etc)
I must mention that the output file will be in WAV format.