C++ (Qt)float sum = 0;for (int i = 0; i < bufLen; i++){ float sample = buffer[i] / 32768.0; sum += (sample * sample);}double rms = sqrt(sum / bufLen);float decibel = 10 * log10(rms);
float decibel = 10 * log10(rms);