I use AudioRecord to record the incoming sounds. This is my loop:
while (isRecording)
{
readBytes = audioRecord.read(buffer, 0, bufferSize);
Log.w("DEBUG", "Readbytes: "+readBytes);
for(short b:buffer)
{
Log.w("DEBUG", "Data: "+b);
}
}
I have to check if the sound has specific characteristics so I examine the buffer array. It contains number from -32,768 to 32,768.
What do these numbers represent? Volume? Amplitude? What means if they are under 0?