AudioRecorder is copying each *sample* into the buffer you provide, element by element. if you don't give it enough space for the sample, you get truncation. and static.

the read(byte[]) method is there for the situation where you set up AudioRecorder to give you 8-bit samples.

i'd confirm this by checking the source but i don't really have the time available right at this instant.

hth



Interesting point, Jason.

However I'm reading a byte at a time so each short is read (just one
byte at a time).  There shouldn't be anything leftover to be missed.

More important though, I'm reading the byte[] using a method provided
by Android's AudioRecord.

read(byte[] audioData, int offsetInBytes, int sizeInBytes)
Reads audio data from the audio hardware for recording into a buffer.

--
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


--
jason.vp.engineering.particle
-- 
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