How to calculate the level/amplitude/db of audio signal in java?

Principally the problem seems to be that you are reading the audio data incorrectly. Specifically I’m not really sure what this excerpt is supposed to mean: if (tempBuffer[j] > tempBuffer[j+1]) … tempBuffer[j] – tempBuffer[j+1]; else … tempBuffer[j + 1] – tempBuffer[j]; But anyhow since you are recording 16-bit data the bytes in the byte array … Read more