We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e30d0c3 commit 102c191Copy full SHA for 102c191
1 file changed
src/audio/internal/audioloudness.cpp
@@ -22,7 +22,7 @@ static void data_callback(ma_device *pDevice, void *pOutput, const void *pInput,
22
23
for (ma_uint32 i = 0; i < frameCount; i++) {
24
float value = pMicDataArray[i];
25
- sum += value * value;
+ sum += std::pow(value, 2) / 20.0f; // TODO: Convert the value properly (it's different than in JS)
26
}
27
28
float rms = std::sqrt(sum / static_cast<float>(frameCount));
0 commit comments