MCPcopy Create free account
hub / github.com/fogleman/nes / HighPassFilter

Function HighPassFilter

nes/filter.go:38–46  ·  view source on GitHub ↗
(sampleRate float32, cutoffFreq float32)

Source from the content-addressed store, hash-verified

36}
37
38func HighPassFilter(sampleRate float32, cutoffFreq float32) Filter {
39 c := sampleRate / math.Pi / cutoffFreq
40 a0i := 1 / (1 + c)
41 return &FirstOrderFilter{
42 B0: c * a0i,
43 B1: -c * a0i,
44 A1: (1 - c) * a0i,
45 }
46}
47
48type FilterChain []Filter
49

Callers 1

SetAudioSampleRateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…