xyosc/signalprocessing/signalprocessing.go
2025-01-16 22:27:12 +01:00

19 lines
306 B
Go

package signalprocessing
import (
"xyosc/audio"
"xyosc/config"
"github.com/mjibson/go-dsp/window"
)
var HannWindow []float64
func Init() {
HannWindow = window.Hann(int(config.Config.ReadBufferSize / audio.SampleSizeInBytes / 2))
}
func CachedWindowFunction(u int) []float64 {
return HannWindow
}