Add option to use decibel scale as before df1d6293817e.
Fix various warnings.