0

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?

Nestor
  • 8,194
  • 7
  • 77
  • 156
  • 2
    Check [this Wikipedia article about PCM](http://en.wikipedia.org/wiki/Pulse-code_modulation) and [this question](http://stackoverflow.com/a/5891128/752320). – Geobits Oct 10 '13 at 19:53
  • Thanks for the information. Your comment should become an answer. – Nestor Oct 10 '13 at 20:00
  • To tell the truth, I voted to close as a duplicate. I'd feel kinda bad answering it now. – Geobits Oct 10 '13 at 20:03
  • Having an answer is what matters to me now :) I wasn't thorough enough when looked for an answer. – Nestor Oct 10 '13 at 20:05

0 Answers0