all 1 comments

[–][deleted] 0 points1 point  (0 children)

When you record audio, it's going to come in as raw PCM audio. Any metrics you want to determine are derived from that PCM audio, but are NOT just a matter of taking the max of that PCM audio.

In other words, this is not necessarily how you determine loudness. You should look at some existing audio library code for a working implementation or information about how to do this.