This commit is contained in:
Louis Dalibard 2025-01-16 22:30:35 +01:00
parent 75a319f204
commit 812323bc09

View File

@ -101,7 +101,7 @@ func (g *Game) Draw(screen *ebiten.Image) {
binary.Read(audio.SampleRingBuffer, binary.NativeEndian, &AX) binary.Read(audio.SampleRingBuffer, binary.NativeEndian, &AX)
binary.Read(audio.SampleRingBuffer, binary.NativeEndian, &AY) binary.Read(audio.SampleRingBuffer, binary.NativeEndian, &AY)
} }
FFTBuffer = window.Apply(FFTBuffer, signalprocessing.CachedWindowFunction) window.Apply(FFTBuffer, signalprocessing.CachedWindowFunction)
X := fft.FFTReal(FFTBuffer) X := fft.FFTReal(FFTBuffer)
r, θ := cmplx.Polar(X[1]) r, θ := cmplx.Polar(X[1])
maxR := r maxR := r