Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Audio peaks may be compressed or normalized with linear gain by post processing or pre-processing to meet desired standard output levels such as xVpp or x dBmV or x Vrms determined by the interface input. This may be required to limit modulation for example or normalize many signals to be mixed or maximize SNR.
this code does none of the above and uses 2 unknown constants, mean and std. But may elsewhere be trying to compute mean and std deviation.. It appears to use assume unsigned or rectified signals
To normalize implies measuring unsigned peaks then scaling by max value to get a gain to factorize every value (post-processing, linear) for streaming , adjusting gain by 1 dB increments with a quasi-peak detection method is used by Sony professional equipment.