This repository has been archived on 2019-12-11. You can view files and clone it, but cannot push or open issues/pull-requests.
jlaudio/lib/extractfreq/aweight.go

13 lines
291 B
Go

package extractfreq
import "math"
// A-weight filter is supposed to correspond to how a human would perceive
// loudness.
func AWeight(f float64) float64 {
return (148693636.0 * f * f * f * f) /
((424.36 + f*f) *
math.Sqrt((f*f+11599.29)*(f*f+544496.41)) *
(f*f + 148693636.0))
}