b13dc04 audio: Rework audio utils and test

Authored and Committed by benzea 6 years ago
    audio: Rework audio utils and test
    
    This adds harmonics measurement and an upper bound for overall gain,
    hopefully causing warnings on systems with extremely high input gain
    (i.e. some Thinkpads).
    
    Note that THD measurement did not help with detecting the high gain. It
    is just a high gain, it isn't bad in the sense that it does not seem to
    distort a lot.
    
        
file modified
+98 -45
file modified
+111 -43