I agree Jason.  It seems requesting the 16 bit format results in a
short array being returned: AudioFormat.ENCODING_PCM_16BIT.

For byte[], I would need to use this format: int audioEncodingFormat =
AudioFormat.ENCODING_PCM_8BIT;

Curiously it seems that AudioFormat.ENCODING_PCM_8BIT doesn't seem to
work.  Other people have posted problems using
AudioFormat.ENCODING_PCM_8BIT.

Guess I'll stick with AudioFormat.ENCODING_PCM_16BIT and covert to
bytes afterwards:

pcmData[totalBytesRead] = (byte) tempBuffer[idxBuffer];
pcmData[totalBytesRead+1] = (byte) (tempBuffer[idxBuffer] >>> 8);
totalBytesRead += 2;



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to